package com.ymatou.iapi.godmch.testcase;

import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

import org.apache.commons.lang.StringUtils;
import org.junit.After;
import org.junit.AfterClass;
import org.junit.Before;
import org.junit.BeforeClass;
import org.junit.Ignore;
import org.junit.Test;
import org.junit.experimental.categories.Category;

import com.google.common.collect.Lists;
import com.ymatou.iapi.activitymanage.parameter.returnProductActivityStockBean;
import com.ymatou.iapi.dguser.parameter.UserCreateBean;
import com.ymatou.iapi.godmch.parameter.CreateCodeBean;
import com.ymatou.iapi.godmch.parameter.addProviderBean;
import com.ymatou.iapi.godmch.parameter.adminBindAgentBean;
import com.ymatou.iapi.godmch.parameter.applyAgentBean;
import com.ymatou.iapi.godmch.parameter.applySupplierBean;
import com.ymatou.iapi.godmch.parameter.approveAgentBean;
import com.ymatou.iapi.godmch.parameter.createIndepMchBean;
import com.ymatou.iapi.godmch.parameter.createagentBean;
import com.ymatou.iapi.godmch.parameter.createmchBean;
import com.ymatou.iapi.godmch.parameter.editmchBean;
import com.ymatou.iapi.godmch.parameter.setShareTypeBean;
import com.ymatou.iapi.godmch.service.CreateCodeCall;
import com.ymatou.iapi.godmch.service.addProviderCall;
import com.ymatou.iapi.godmch.service.adminBindAgentCall;
import com.ymatou.iapi.godmch.service.applyAgentCall;
import com.ymatou.iapi.godmch.service.applySupplierCall;
import com.ymatou.iapi.godmch.service.createIndepMchCall;
import com.ymatou.iapi.godmch.service.createagentCall;
import com.ymatou.iapi.godmch.service.setShareTypeCall;
import com.ymatou.mq.admin.parameter.MessageListBean;
import com.ymt.core.tool.Logger;
import com.ymt.utils.annotation.*;
import com.ymt.utils.tag.*;
import com.ymttest.business.service.DGUserCallService;
import com.ymttest.business.service.MqQueryCallService;
import com.ymttest.business.service.shenqi.GodmchManageCallService;
import com.ymttest.database.model.agent_type;
import com.ymttest.database.model.mch_info;
import com.ymttest.database.model.godmch.mch_config;
import com.ymttest.database.model.godmch.mch_configExample;
import com.ymttest.database.sqlwapper.godmch.mch_configWapper;
import com.ymttest.database.sqlwapper.godmch.mch_infoWapper;
import com.ymttest.utils.TestDataManager;
/**
*设置商户店铺分享方式信息（运营后台）id
*FreeMaker Template自动生成代码
*/
@TestSuite
public class Ts_setShareType{
	private static setShareTypeBean bean;
	private static setShareTypeCall call;
	private  mch_infoWapper mchinfoWapper=new mch_infoWapper();
	private MqQueryCallService mqQueryCallService=new MqQueryCallService();
	private  mch_infoWapper mchInfoWapper = new mch_infoWapper();
	private mch_configWapper mchconfigWapper;
	@BeforeClass
	public static void setUp() {
		Logger.createResultFile("设置商户店铺分享方式信息（运营后台）id");
	}

	@Before
	public void caseUp() {
		bean=new setShareTypeBean();
		call=new setShareTypeCall();
		mchconfigWapper=new mch_configWapper();
	}

	@AfterClass
	public static void tearDown() {
		Logger.generateResult(call.getOpurl());
	}

	@After
	public void caseDown() {
		Logger.end();
	}
	
	/**
	 * setShareType 初始化
	 * @return
	 * @throws Exception
	 */
	private setShareTypeBean initSetShareType() throws Exception{
		
		HashMap<String,Object> map=new HashMap();
		map.put("mchId", bean.getMchId());
	    mch_info act_info=mchinfoWapper.selectby(map).get(0);
	     
		//渠道
		UserCreateBean usercreateBean1=DGUserCallService.initUsercreateBean();//初始化创建用户 为什么手机号没有值
		int userId_channl=DGUserCallService.UserCreateCall(usercreateBean1);
		
		createmchBean createmchbean=GodmchManageCallService.InitcreatemchBeanForChannel(userId_channl);
		GodmchManageCallService.createmchCallForChannel(createmchbean);
		editmchBean editmchbean = GodmchManageCallService.IniteditmachBean(userId_channl);
		GodmchManageCallService.editmachCall(editmchbean);
		
		bean.setMchId(userId_channl);
		bean.setMchShareType(1);//分享方式1：小程序 2：H5 3：独立小程序  4：独立h5  5：继承版小程序
		bean.setMchStatus(0);
		bean.setRemark("test");
	
		bean.setPayMode(1);//支付方式:微信支付通道1：飞界国际2：飞界国际电子商务3：盛付通
		bean.setAliPayMode(0);//支付宝支付通道0：不支持支付宝 1：飞界国际
		//新字段
		bean.setMchSideBuy(1);//商家端购买1：二维码购买 2：直接购买
		bean.setDualMode(0);//双店模式0：正常模式（默认）1：双店模式
		//风控字段
		bean.setProductRiskAmount(new BigDecimal(20000));
		bean.setTradeRiskAmount(new BigDecimal(25000));
		return bean;
	}
//	/**
//	 * 根据商户创建代理
//	 * @param mchId_channl
//	 * @return
//	 * @throws Exception
//	 */
//	private Integer createAgent(Integer mchId_channl) throws Exception {
//		UserCreateBean usercreateBean1=DGUserCallService.initUsercreateBean();
//		int userId_agent=DGUserCallService.UserCreateCall(usercreateBean1);
//		List<createmchBean> createmchList=GodmchManageCallService.InitcreatemchBeanForAgent(mchId_channl, userId_agent);
//		GodmchManageCallService.createmchCallForAgent(createmchList.toArray(new
//				createmchBean[createmchList.size()]));
//		return userId_agent;
//	}
	private void check_verify(boolean... isRisk) throws InterruptedException
	{
		HashMap<String,Object> map=new HashMap();
		map.put("mchId", bean.getMchId());
	     mch_info act_info=mchinfoWapper.selectby(map).get(0);
	     
		Logger.verifyEquals("200", call.getStatus1(), "验证返回成功status值");
        Logger.verifyEquals("请求成功", call.getMessage(), "验证返回成功Message值");
        Logger.verifyEquals(act_info.getMchShareType(), bean.getMchShareType(), "验证数据库mch_info 中字段MchShareType与传入的是否一致");
        Logger.verifyEquals(act_info.getState(), bean.getMchStatus(), "验证数据库mch_info 中字段State与传入的MchStatus是否一致");
        Logger.verifyEquals(act_info.getRemark(), bean.getRemark(), "验证数据库mch_info 中字段Remark与传入的Remark是否一致");
        //新增
        //双店模式
        mch_configExample example=new mch_configExample();
        example.createCriteria().andMchIdEqualTo(bean.getMchId());
        mch_config mchconfig=mchconfigWapper.selectByExample(example).get(0);
        Logger.verifyEquals(act_info.getDualMode(), bean.getDualMode(), "验证数据库mch_info 中字段DualMode与传入的DualMode是否一致");
        //购买方式
        Logger.verifyEquals(mchconfig.getMchSideBuy(), bean.getMchSideBuy(), "验证数据库mch_confog 中字段MchSideBuy与传入的MchSideBuy是否一致");
        //支付类型
        Logger.verifyEquals(bean.getPayMode(), act_info.getPayMode(), "验证数据库mch_info 中字段paymode与传入的paymode是否一致");
        //风控字段
        if(isRisk.length>0 && isRisk[0]==true)
        {
          Logger.verifyEquals(mchconfig.getProductRiskAmount().stripTrailingZeros().toPlainString(), bean.getProductRiskAmount().stripTrailingZeros().toPlainString(), "验证数据库mch_confog 中字段ProductRiskAmount与传入的ProductRiskAmount是否一致");
          Logger.verifyEquals(mchconfig.getTradeRiskAmount().stripTrailingZeros().toPlainString(), bean.getTradeRiskAmount().stripTrailingZeros().toPlainString(), "验证数据库mch_confog 中字段TradeRiskAmount与传入的TradeRiskAmount是否一致");
        }
        else if(isRisk.length>0 && isRisk[0]==false) {
          Logger.verifyEquals("0",mchconfig.getProductRiskAmount().stripTrailingZeros().toPlainString(), "验证数据库mch_confog 中字段ProductRiskAmount=0,不受限制");
          Logger.verifyEquals("0",mchconfig.getTradeRiskAmount().stripTrailingZeros().toPlainString(), "验证数据库mch_confog 中字段getTradeRiskAmount=0,不受限制");
		}
        //20200425 是否支持海外地址
        Logger.verifyEquals(mchconfig.getOverseasAddressEnabled(), bean.getOverseasAddressEnabled(), "验证数据库mch_confog 中字段OverseasAddressEnabled与传入的OverseasAddressEnabled是否一致");
        //是否开启图片补白功能
        Logger.verifyEquals(mchconfig.getProductPicAutoFill(), bean.getProductPicAutoFill(), "验证数据库mch_confog 中字段ProductPicAutoFill与传入的ProductPicAutoFill是否一致");
        //多币种标识
        Logger.verifyEquals(String.join(",",bean.getMultiCurrencyList()==null?Lists.newArrayList():bean.getMultiCurrencyList()), act_info.getMultiCurrency(), "验证数据库mch_info 中字段MultiCurrency与传入的MultiCurrency是否一致");

	}
	/**
	 * 验证支付通道切换逻辑
	 * @throws InterruptedException 
	 */
	private void check_pay(Integer mchId,Integer... mchId_agent) throws InterruptedException
	{
		Logger.comment("mchId:"+mchId);
		
		
		HashMap<String,Object> map=new HashMap();
		map.put("mchId", mchId);
	    mch_info channl_info=mchinfoWapper.selectby(map).get(0);

		Logger.verifyEquals("200", call.getStatus1(), "验证返回成功status值");
        Logger.verifyEquals("请求成功", call.getMessage(), "验证返回成功Message值");
        
        Logger.verifyEquals(channl_info.getPayMode(), bean.getPayMode(), "验证数据库mch_info 中字段PayMode与传入的是否一致");
        if(mchId_agent.length>0)
        {
        	Logger.comment("mchId_agent:"+mchId_agent[0]);
        	map=new HashMap();
     		map.put("mchId", mchId_agent[0]);
     	    mch_info agent_info=mchinfoWapper.selectby(map).get(0);
     	    Logger.verifyEquals(2,agent_info.getPayMode(),"验证代理对应的 数据库mch_info 中字段PayMode=2不变");
        }
        	 
	}
	@Test
	@Category({P1.class})
	@TestCase
	public void Tc_setShareType_001() {
		Logger.start(true,"正例-设置商户店铺分享方式信息（运营后台）-分享类型与设置类型不一致");
		try {
			//渠道
			UserCreateBean usercreateBean1=DGUserCallService.initUsercreateBean();//初始化创建用户 为什么手机号没有值
			int userId_channl=DGUserCallService.UserCreateCall(usercreateBean1);
			
			createmchBean createmchbean=GodmchManageCallService.InitcreatemchBeanForChannel(userId_channl);
			GodmchManageCallService.createmchCallForChannel(createmchbean);
			editmchBean editmchbean = GodmchManageCallService.IniteditmachBean(userId_channl);
			GodmchManageCallService.editmachCall(editmchbean);
			
			bean.setMchId(userId_channl);
			bean.setMchShareType(1);
			bean.setMchStatus(0);
			bean.setRemark("test");
			//新字段
			bean.setPayMode(1);//支付方式:微信支付通道1：飞界国际2：飞界国际电子商务3：盛付通
			bean.setMchSideBuy(1);//商家端购买1：二维码购买 2：直接购买
			bean.setDualMode(0);//双店模式0：正常模式（默认）1：双店模式
			call.setData(bean);
			call.callService();			
			
			check_verify();
	        
	        Thread.sleep(5000);
			//验证更改分享类型发消息总线
	        MessageListBean messageListBean=mqQueryCallService.initGodmchManage(String.valueOf(bean.getMchId()), "change_share_type");
	        List <Map> mq=mqQueryCallService.GetMqMessage(messageListBean);
	        if(mq.size()==0){
				Thread.sleep(5000);
				mq = MqQueryCallService.GetMqMessage(messageListBean);
			}
	        Logger.verifyEquals(mq.get(0).get("mchShareType"), bean.getMchShareType(), "验证消息总线分享类型MchShareType");
	        Logger.verifyEquals(mq.get(0).get("userId"),bean.getMchId(), "验证消息总线商户Id MchId");
	        
	        //风控发MQ 不管风控是否更改都需要风控MQ
	        messageListBean=mqQueryCallService.initGodmchManage(String.valueOf(bean.getMchId()), "change_risk");
	        List <Map> mq_risk=mqQueryCallService.GetMqMessage(messageListBean);
	        if(mq_risk.size()==0){
				Thread.sleep(5000);
				mq_risk = MqQueryCallService.GetMqMessage(messageListBean);
			}
	        Logger.verifyEquals(mq_risk.get(0).get("userId"),bean.getMchId(), "验证消息总线商户Id MchId");
	        
		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	
	@Test
	@Category({P1.class})
	@TestCase
	public void Tc_setShareType_001_2() {
		Logger.start(true,"正例-设置商户店铺分享方式信息（运营后台）-分享类型与设置类型一致,不发消息总线");
		try {
			HashMap<String,Object> map=new HashMap();
			map.put("mchId", bean.getMchId());
		    mch_info act_info=mchinfoWapper.selectby(map).get(0);
		    
			//渠道
			UserCreateBean usercreateBean1=DGUserCallService.initUsercreateBean();//初始化创建用户 为什么手机号没有值
			int userId_channl=DGUserCallService.UserCreateCall(usercreateBean1);
			
			createmchBean createmchbean=GodmchManageCallService.InitcreatemchBeanForChannel(userId_channl);
			GodmchManageCallService.createmchCallForChannel(createmchbean);
			editmchBean editmchbean = GodmchManageCallService.IniteditmachBean(userId_channl);
			GodmchManageCallService.editmachCall(editmchbean);
			
			map=new HashMap();
			map.put("mchId", userId_channl);
			act_info=mchinfoWapper.selectby(map).get(0);
			
			bean.setMchId(userId_channl);
			bean.setMchShareType(act_info.getMchShareType());
			bean.setMchStatus(0);
			bean.setRemark("test");
			//新字段
			bean.setPayMode(act_info.getPayMode());//支付方式:微信支付通道1：飞界国际2：飞界国际电子商务3：盛付通
			bean.setMchSideBuy(1);//商家端购买1：二维码购买 2：直接购买
			bean.setDualMode(0);//双店模式0：正常模式（默认）1：双店模式
			call.setData(bean);
			call.callService();			
			
			check_verify();
	        
	        Thread.sleep(3000);
			//验证消息总线
	        MessageListBean messageListBean=mqQueryCallService.initGodmchManage(String.valueOf(bean.getMchId()), "change_share_type");
	        List <Map> mq=mqQueryCallService.GetMqMessage(messageListBean);
	        Logger.verifyEquals(mq.size(), 0, "验证消息总线返回空");
	        
		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	@Test
	@Category({P1.class})
	@TestCase
	public void Tc_setShareType_001_1() {
		Logger.start(true,"正例-设置商户店铺分享方式信息（运营后台）-商户状态为 关闭");
		try {
			//渠道
			UserCreateBean usercreateBean1=DGUserCallService.initUsercreateBean();//初始化创建用户 为什么手机号没有值
			int userId_channl=DGUserCallService.UserCreateCall(usercreateBean1);
			
			createmchBean createmchbean=GodmchManageCallService.InitcreatemchBeanForChannel(userId_channl);
			GodmchManageCallService.createmchCallForChannel(createmchbean);
			editmchBean editmchbean = GodmchManageCallService.IniteditmachBean(userId_channl);
			GodmchManageCallService.editmachCall(editmchbean);
			
			bean.setMchId(userId_channl);
			bean.setMchShareType(1);
			bean.setMchStatus(-1);
			bean.setRemark("test");
			//新字段
			bean.setPayMode(1);//微信HipoPay支付通道:微信支付通道1：飞界国际2：飞界国际电子商务3：盛付通 4:飞界国际贸易 5：自有支付
			bean.setMchSideBuy(1);//商家端购买1：二维码购买 2：直接购买
			bean.setDualMode(0);//双店模式0：正常模式（默认）1：双店模式
			//bean.setAliPayMode(1);//微信国内支付通道0：不支持1：盛付通
			call.setData(bean);
			call.callService();	
			check_verify();
				
		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	@Test
	@Category({P1.class})
	@TestCase
	public void Tc_setShareType_002() {
		Logger.start(true,"正例-设置商户店铺分享方式信息（运营后台）-渠道是公共小程序-渠道下的第一次代理也设置与渠道一致");
		try {
			//渠道
			UserCreateBean usercreateBean1=DGUserCallService.initUsercreateBean();//初始化创建用户 为什么手机号没有值
			int userId_channl=DGUserCallService.UserCreateCall(usercreateBean1);
			
			//代理
			usercreateBean1=DGUserCallService.initUsercreateBean();
			int userId_agent=DGUserCallService.UserCreateCall(usercreateBean1);
			
			createmchBean createmchbean=GodmchManageCallService.InitcreatemchBeanForChannel(userId_channl);
			GodmchManageCallService.createmchCallForChannel(createmchbean);
			editmchBean editmchbean = GodmchManageCallService.IniteditmachBean(userId_channl);
			GodmchManageCallService.editmachCall(editmchbean);

			bean.setMchId(userId_channl);
			bean.setMchShareType(1);//公共小程序
			bean.setMchStatus(0);
			bean.setRemark("test");
			//新字段
			bean.setPayMode(1);//支付方式:微信支付通道1：飞界国际2：飞界国际电子商务3：盛付通
			bean.setMchSideBuy(1);//商家端购买1：二维码购买 2：直接购买
			bean.setDualMode(0);//双店模式0：正常模式（默认）1：双店模式
			
			call.setData(bean);
			call.callService();			
			
			//创建代理
			List<createmchBean> createmchList=GodmchManageCallService.InitcreatemchBeanForAgent(userId_channl, userId_agent);
			GodmchManageCallService.createmchCallForAgent(createmchList.toArray(new
					createmchBean[createmchList.size()]));
			editmchBean editmchbean2 = GodmchManageCallService.IniteditmachBean(userId_agent);
			GodmchManageCallService.editmachCall(editmchbean2);
			
			HashMap<String,Object> map=new HashMap();
			map.put("mchId", bean.getMchId());
		    mch_info act_info=mchinfoWapper.selectby(map).get(0);
			Logger.verifyEquals("200", call.getStatus1(), "验证返回成功status值");
	        Logger.verifyEquals("请求成功", call.getMessage(), "验证返回成功Message值");
	        Logger.verifyEquals(act_info.getMchShareType(), bean.getMchShareType(), "验证数据库名称Info 中字段MchShareType与传入的是否一致");
	        //添加渠道下的第一次代理也设置与渠道一致 验证
	        HashMap<String,Object> map2=new HashMap();
	        map2.put("mchId", userId_agent);
		    mch_info act_info2=mchinfoWapper.selectby(map2).get(0);
		    Logger.verifyEquals(act_info.getMchShareType(), act_info2.getMchShareType(), "验证第一次注册代理分享类型与渠道一致");
		    
	        
		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	
	@Test
	@Category({P1.class})
	@TestCase
	public void Tc_setShareType_002_1_1() {
		Logger.start(true,"正例-设置商户店铺分享方式信息（运营后台）-渠道是公共H5-渠道下的第一次代理也设置与渠道一致");
		try {
			//渠道
			UserCreateBean usercreateBean1=DGUserCallService.initUsercreateBean();//初始化创建用户 为什么手机号没有值
			int userId_channl=DGUserCallService.UserCreateCall(usercreateBean1);
			
			//代理
			usercreateBean1=DGUserCallService.initUsercreateBean();
			int userId_agent=DGUserCallService.UserCreateCall(usercreateBean1);
			
			createmchBean createmchbean=GodmchManageCallService.InitcreatemchBeanForChannel(userId_channl);
			GodmchManageCallService.createmchCallForChannel(createmchbean);
			editmchBean editmchbean = GodmchManageCallService.IniteditmachBean(userId_channl);
			GodmchManageCallService.editmachCall(editmchbean);

			bean.setMchId(userId_channl);
			bean.setMchShareType(2);//公共H5
			bean.setMchStatus(0);
			bean.setRemark("test");
			//新字段
			bean.setPayMode(1);//支付方式:微信支付通道1：飞界国际2：飞界国际电子商务3：盛付通
			bean.setMchSideBuy(1);//商家端购买1：二维码购买 2：直接购买
			bean.setDualMode(0);//双店模式0：正常模式（默认）1：双店模式
			
			call.setData(bean);
			call.callService();			
			
			//创建代理
			List<createmchBean> createmchList=GodmchManageCallService.InitcreatemchBeanForAgent(userId_channl, userId_agent);
			GodmchManageCallService.createmchCallForAgent(createmchList.toArray(new
					createmchBean[createmchList.size()]));
			editmchBean editmchbean2 = GodmchManageCallService.IniteditmachBean(userId_agent);
			GodmchManageCallService.editmachCall(editmchbean2);
			
			HashMap<String,Object> map=new HashMap();
			map.put("mchId", bean.getMchId());
		    mch_info act_info=mchinfoWapper.selectby(map).get(0);
			Logger.verifyEquals("200", call.getStatus1(), "验证返回成功status值");
	        Logger.verifyEquals("请求成功", call.getMessage(), "验证返回成功Message值");
	        Logger.verifyEquals(act_info.getMchShareType(), bean.getMchShareType(), "验证数据库名称Info 中字段MchShareType与传入的是否一致");
	        //添加渠道下的第一次代理也设置与渠道一致 验证
	        HashMap<String,Object> map2=new HashMap();
	        map2.put("mchId", userId_agent);
		    mch_info act_info2=mchinfoWapper.selectby(map2).get(0);
		    Logger.verifyEquals(act_info.getMchShareType(), act_info2.getMchShareType(), "验证第一次注册代理分享类型与渠道一致");
		    
//	        Thread.sleep(3000);
//			//验证消息总线
//	        MessageListBean messageListBean=mqQueryCallService.initGodmchManage(String.valueOf(bean.getMchId()), "change_share_type");
//	        List <Map> mq=mqQueryCallService.GetMqMessage(messageListBean);
//	        if(mq.size()==0){
//				Thread.sleep(5000);
//				mq = MqQueryCallService.GetMqMessage(messageListBean);
//			}
//	        Logger.verifyEquals(mq.get(0).get("mchShareType"), bean.getMchShareType(), "验证消息总线分享类型MchShareType");
//	        Logger.verifyEquals(mq.get(0).get("userId"),bean.getMchId(), "验证消息总线商户Id MchId");
	        
		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	
	@Test
	@Category({P1.class})
	@TestCase
	public void Tc_setShareType_002_1() {
		//渠道有第一次注册代理-独立小程序-渠道下的第一次代理是独立h5
		Logger.start(true,"正例-设置商户店铺分享方式信息（运营后台）-身份纯渠道，先设置渠道分享方式(独立小程序),再创建渠道代理-渠道下的代理是独立H5");
		//该类型渠道商新进来的代理，如果渠道商是独立支付，那么代理商的分享类型是独立H5
		try {
			//20190624修改
			//渠道
			UserCreateBean usercreateBean1=DGUserCallService.initUsercreateBean();//初始化创建用户 为什么手机号没有值
			int userId_channl=DGUserCallService.UserCreateCall(usercreateBean1);
			
			//代理
			usercreateBean1=DGUserCallService.initUsercreateBean();
			int userId_agent=DGUserCallService.UserCreateCall(usercreateBean1);
			
			createmchBean createmchbean=GodmchManageCallService.InitcreatemchBeanForChannel(userId_channl);
			GodmchManageCallService.createmchCallForChannel(createmchbean);
			editmchBean editmchbean = GodmchManageCallService.IniteditmachBean(userId_channl);
			GodmchManageCallService.editmachCall(editmchbean);

			bean.setMchId(userId_channl);
			bean.setMchShareType(3);//分享方式1：小程序 2：H5 3：独立小程序  4：独立h5 5：继承版小程序
			bean.setMchStatus(0);
			bean.setRemark("test");
			//新字段
			bean.setPayMode(5);//微信HipoPay支付通道:微信支付通道1：飞界国际2：飞界国际电子商务3：盛付通 4:飞界国际贸易 5：自有支付
			bean.setMchSideBuy(1);//商家端购买1：二维码购买 2：直接购买
			bean.setDualMode(0);//双店模式0：正常模式（默认）1：双店模式
			call.setData(bean);
			call.callService();			
			
			//创建代理
			List<createmchBean> createmchList=GodmchManageCallService.InitcreatemchBeanForAgent(userId_channl, userId_agent);
			GodmchManageCallService.createmchCallForAgent(createmchList.toArray(new
					createmchBean[createmchList.size()]));
			editmchBean editmchbean2 = GodmchManageCallService.IniteditmachBean(userId_agent);
			GodmchManageCallService.editmachCall(editmchbean2);
			
			Logger.comment("#######  userId_channl  ##### "+userId_channl);
			Logger.comment("#######  userId_agent  ##### "+userId_agent);
			
			HashMap<String,Object> map=new HashMap();
			map.put("mchId", bean.getMchId());
		    mch_info act_info=mchinfoWapper.selectby(map).get(0);
			Logger.verifyEquals("200", call.getStatus1(), "验证返回成功status值");
	        Logger.verifyEquals("请求成功", call.getMessage(), "验证返回成功Message值");
	        Logger.verifyEquals(act_info.getMchShareType(), bean.getMchShareType(), "验证数据库名称Info 中字段MchShareType与传入的是否一致");
	        //添加渠道下的第一次代理是公共小程序 验证
           HashMap<String,Object> map2=new HashMap();
	        map2.put("mchId", userId_agent);
		    mch_info act_info2=mchinfoWapper.selectby(map2).get(0);
		    Logger.verifyEquals(4, act_info2.getMchShareType(), "验证当渠道是独立小程序时注册代理分享类型是独立h5");//20190624修改
		    
//	        Thread.sleep(3000);
//			//验证消息总线
//	        MessageListBean messageListBean=mqQueryCallService.initGodmchManage(String.valueOf(bean.getMchId()), "change_share_type");
//	        List <Map> mq=mqQueryCallService.GetMqMessage(messageListBean);
//	        if(mq.size()==0){
//				Thread.sleep(5000);
//				mq = MqQueryCallService.GetMqMessage(messageListBean);
//			}
//	        Logger.verifyEquals(mq.get(0).get("mchShareType"), bean.getMchShareType(), "验证消息总线分享类型MchShareType");
//	        Logger.verifyEquals(mq.get(0).get("userId"),bean.getMchId(), "验证消息总线商户Id MchId");
//	        
		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	
	

	@Test
	@Category({P1.class})
	@TestCase
	@Ignore
	public void Tc_setShareType_002_2() {
		//独立H5不能使用飞界国际 20200407 修改
		Logger.start(true,"正例-设置商户店铺分享方式信息（运营后台）-身份纯渠道，先设置渠道分享方式(独立H5),再创建渠道代理-渠道下的代理也是独立H5");
		try {
			//渠道
			UserCreateBean usercreateBean1=DGUserCallService.initUsercreateBean();//初始化创建用户 为什么手机号没有值
			int userId_channl=DGUserCallService.UserCreateCall(usercreateBean1);
			
			//代理
			usercreateBean1=DGUserCallService.initUsercreateBean();
			int userId_agent=DGUserCallService.UserCreateCall(usercreateBean1);
			
			createmchBean createmchbean=GodmchManageCallService.InitcreatemchBeanForChannel(userId_channl);
			GodmchManageCallService.createmchCallForChannel(createmchbean);
			editmchBean editmchbean = GodmchManageCallService.IniteditmachBean(userId_channl);
			GodmchManageCallService.editmachCall(editmchbean);

			bean.setMchId(userId_channl);
			bean.setMchShareType(4);
			bean.setMchStatus(0);
			bean.setRemark("test");
			//新字段
			bean.setPayMode(1);//支付方式:微信支付通道1：飞界国际2：飞界国际电子商务3：盛付通
			bean.setMchSideBuy(1);//商家端购买1：二维码购买 2：直接购买
			bean.setDualMode(0);//双店模式0：正常模式（默认）1：双店模式
			
			call.setData(bean);
			call.callService();			
			
			//创建代理
			List<createmchBean> createmchList=GodmchManageCallService.InitcreatemchBeanForAgent(userId_channl, userId_agent);
			GodmchManageCallService.createmchCallForAgent(createmchList.toArray(new
					createmchBean[createmchList.size()]));
			editmchBean editmchbean2 = GodmchManageCallService.IniteditmachBean(userId_agent);
			GodmchManageCallService.editmachCall(editmchbean2);
			
			Logger.comment("#######  userId_channl  ##### "+userId_channl);
			Logger.comment("#######  userId_agent  ##### "+userId_agent);
			
			HashMap<String,Object> map=new HashMap();
			map.put("mchId", bean.getMchId());
		    mch_info act_info=mchinfoWapper.selectby(map).get(0);
			Logger.verifyEquals("200", call.getStatus1(), "验证返回成功status值");
	        Logger.verifyEquals("请求成功", call.getMessage(), "验证返回成功Message值");
	        Logger.verifyEquals(act_info.getMchShareType(), bean.getMchShareType(), "验证数据库名称Info 中字段MchShareType与传入的是否一致");
	        //添加渠道下的第一次代理是公共小程序 验证
	        HashMap<String,Object> map2=new HashMap();
	        map2.put("mchId", userId_agent);
		    mch_info act_info2=mchinfoWapper.selectby(map2).get(0);
		    Logger.verifyEquals(4, act_info2.getMchShareType(), "验证当渠道是独立H5时注册代理分享类型是独立H5");
		    
	        Thread.sleep(3000);
			//验证消息总线
	        MessageListBean messageListBean=mqQueryCallService.initGodmchManage(String.valueOf(bean.getMchId()), "change_share_type");
	        List <Map> mq=mqQueryCallService.GetMqMessage(messageListBean);
	        if(mq.size()==0){
				Thread.sleep(5000);
				mq = MqQueryCallService.GetMqMessage(messageListBean);
			}
	        Logger.verifyEquals(mq.get(0).get("mchShareType"), bean.getMchShareType(), "验证消息总线分享类型MchShareType");
	        Logger.verifyEquals(mq.get(0).get("userId"),bean.getMchId(), "验证消息总线商户Id MchId");
	        
		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	
	@Test
	@Category({P1.class})
	@TestCase
	public void Tc_setShareType_003() {
		Logger.start(true,"正例-设置商户店铺分享方式信息（运营后台）-渠道重新设置分享方式，不影响已注册过的代理");
		try {
			//渠道
			UserCreateBean usercreateBean1=DGUserCallService.initUsercreateBean();//初始化创建用户 为什么手机号没有值
			int userId_channl=DGUserCallService.UserCreateCall(usercreateBean1);
			
			//代理
			usercreateBean1=DGUserCallService.initUsercreateBean();
			int userId_agent=DGUserCallService.UserCreateCall(usercreateBean1);
			
			createmchBean createmchbean=GodmchManageCallService.InitcreatemchBeanForChannel(userId_channl);
			GodmchManageCallService.createmchCallForChannel(createmchbean);
			editmchBean editmchbean = GodmchManageCallService.IniteditmachBean(userId_channl);
			GodmchManageCallService.editmachCall(editmchbean);
			//创建代理
			List<createmchBean> createmchList=GodmchManageCallService.InitcreatemchBeanForAgent(userId_channl, userId_agent);
			GodmchManageCallService.createmchCallForAgent(createmchList.toArray(new
					createmchBean[createmchList.size()]));
			editmchBean editmchbean2 = GodmchManageCallService.IniteditmachBean(userId_agent);
			GodmchManageCallService.editmachCall(editmchbean2);
			
			bean.setMchId(userId_channl);
			bean.setMchShareType(2);
			bean.setMchStatus(0);
			bean.setRemark("test");
			
			//新字段
			bean.setPayMode(2);//支付方式:微信支付通道1：飞界国际2：飞界国际电子商务3：盛付通
			bean.setMchSideBuy(1);//商家端购买1：二维码购买 2：直接购买
			bean.setDualMode(0);//双店模式0：正常模式（默认）1：双店模式
			
			call.setData(bean);
			call.callService();			
			
			HashMap<String,Object> map=new HashMap();
			map.put("mchId", bean.getMchId());
		    mch_info act_info=mchinfoWapper.selectby(map).get(0);
			Logger.verifyEquals("200", call.getStatus1(), "验证返回成功status值");
	        Logger.verifyEquals("请求成功", call.getMessage(), "验证返回成功Message值");
	        Logger.verifyEquals(act_info.getMchShareType(), bean.getMchShareType(), "验证数据库名称Info 中字段MchShareType与传入的是否一致");
	        //添加渠道下的第一次代理也设置与渠道一致 验证
	        HashMap<String,Object> map2=new HashMap();
	        map2.put("mchId", userId_agent);
		    mch_info act_info2=mchinfoWapper.selectby(map2).get(0);
		    Logger.verifyEquals(2, act_info2.getMchShareType(), "验证第一次注册代理分享类型与渠道一致");//渠道重新设置分享方式，不影响已注册过的代理,已注册的代理默认1 小程序
		    
//	        Thread.sleep(3000);
//			//验证消息总线
//	        MessageListBean messageListBean=mqQueryCallService.initGodmchManage(String.valueOf(bean.getMchId()), "change_share_type");
//	        List <Map> mq=mqQueryCallService.GetMqMessage(messageListBean);
//	        if(mq.size()==0){
//				Thread.sleep(5000);
//				mq = MqQueryCallService.GetMqMessage(messageListBean);
//			}
//	        Logger.verifyEquals(mq.get(0).get("mchShareType"), bean.getMchShareType(), "验证消息总线分享类型MchShareType");
//	        Logger.verifyEquals(mq.get(0).get("userId"),bean.getMchId(), "验证消息总线商户Id MchId");
		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	@Test
	@Category({P1.class})
	@TestCase
	public void Tc_setShareType_004() {
		Logger.start(true,"反例-设置商户店铺分享方式信息（运营后台）-传入的商户不存在");
		try {
			
			bean.setMchId(999999999);
			bean.setMchShareType(1);
			bean.setMchStatus(0);
			bean.setRemark("test");
			//新字段
			bean.setPayMode(1);//支付方式:微信支付通道1：飞界国际2：飞界国际电子商务3：盛付通
			bean.setMchSideBuy(1);//商家端购买1：二维码购买 2：直接购买
			bean.setDualMode(0);//双店模式0：正常模式（默认）1：双店模式
			call.setData(bean);
			call.callService();			
			Logger.verifyEquals("5004", call.getStatus1(), "验证返回成功status值");
	        Logger.verifyEquals("商户不存在", call.getMessage(), "验证返回成功Message值");
	        
			//验证消息总线
	        MessageListBean messageListBean=mqQueryCallService.initGodmchManage(String.valueOf(bean.getMchId()), "change_share_type");
	        List <Map> mq=mqQueryCallService.GetMqMessage(messageListBean);
	        Logger.verifyEquals(mq.size(), 0, "验证消息总线返回空");

	        
		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	@Test
	@Category({P1.class})
	@TestCase
	public void Tc_setShareType_005() {
		Logger.start(true,"正例-设置商户店铺分享方式信息（运营后台）-传入mchShareType=3,独立小程序");
		try {
			//渠道
			UserCreateBean usercreateBean1=DGUserCallService.initUsercreateBean();//初始化创建用户 为什么手机号没有值
			int userId_channl=DGUserCallService.UserCreateCall(usercreateBean1);
			
			createmchBean createmchbean=GodmchManageCallService.InitcreatemchBeanForChannel(userId_channl);
			GodmchManageCallService.createmchCallForChannel(createmchbean);
			editmchBean editmchbean = GodmchManageCallService.IniteditmachBean(userId_channl);
			GodmchManageCallService.editmachCall(editmchbean);
			
			bean.setMchId(userId_channl);
			bean.setMchShareType(3);
			bean.setMchStatus(0);
			bean.setRemark("test");
			//新字段
			bean.setPayMode(1);//支付方式:微信支付通道1：飞界国际2：飞界国际电子商务3：盛付通
			bean.setMchSideBuy(1);//商家端购买1：二维码购买 2：直接购买
			bean.setDualMode(0);//双店模式0：正常模式（默认）1：双店模式
			call.setData(bean);
			call.callService();			
			
			HashMap<String,Object> map=new HashMap();
			map.put("mchId", bean.getMchId());
		     mch_info act_info=mchinfoWapper.selectby(map).get(0);
			Logger.verifyEquals("200", call.getStatus1(), "验证返回成功status值");
	        Logger.verifyEquals("请求成功", call.getMessage(), "验证返回成功Message值");
	        Logger.verifyEquals(act_info.getMchShareType(), bean.getMchShareType(), "验证数据库mch_info 中字段MchShareType与传入的是否一致");
	        Logger.verifyEquals(act_info.getState(), bean.getMchStatus(), "验证数据库mch_info 中字段State与传入的MchStatus是否一致");
	        Logger.verifyEquals(act_info.getRemark(), bean.getRemark(), "验证数据库mch_info 中字段Remark与传入的Remark是否一致");
	        
			//验证消息总线
	        MessageListBean messageListBean=mqQueryCallService.initGodmchManage(String.valueOf(bean.getMchId()), "change_share_type");
	        List <Map> mq=mqQueryCallService.GetMqMessage(messageListBean);
	        if(mq.size()==0){
				Thread.sleep(5000);
				mq = MqQueryCallService.GetMqMessage(messageListBean);
			}
	        Logger.verifyEquals(mq.get(0).get("mchShareType"), bean.getMchShareType(), "验证消息总线分享类型MchShareType");
	        Logger.verifyEquals(mq.get(0).get("userId"),bean.getMchId(), "验证消息总线商户Id MchId");			
	        
		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	@Test
	@Category({P1.class})
	@TestCase
	public void Tc_setShareType_005_11() {
		//独立H5不能使用飞界国际
		Logger.start(true,"正例-设置商户店铺分享方式信息（运营后台）-传入mchShareType=4,独立h5");
		try {
			//渠道
			UserCreateBean usercreateBean1=DGUserCallService.initUsercreateBean();//初始化创建用户 为什么手机号没有值
			int userId_channl=DGUserCallService.UserCreateCall(usercreateBean1);
			
			createmchBean createmchbean=GodmchManageCallService.InitcreatemchBeanForChannel(userId_channl);
			GodmchManageCallService.createmchCallForChannel(createmchbean);
			editmchBean editmchbean = GodmchManageCallService.IniteditmachBean(userId_channl);
			GodmchManageCallService.editmachCall(editmchbean);
			
			bean.setMchId(userId_channl);
			bean.setMchShareType(4);
			bean.setMchStatus(0);
			bean.setRemark("test");
			//新字段
			bean.setPayMode(5);//微信HipoPay支付通道:微信支付通道1：飞界国际2：飞界国际电子商务3：盛付通 4:飞界国际贸易 5：自有支付
			bean.setMchSideBuy(1);//商家端购买1：二维码购买 2：直接购买
			bean.setDualMode(0);//双店模式0：正常模式（默认）1：双店模式
			call.setData(bean);
			call.callService();			
			
			HashMap<String,Object> map=new HashMap();
			map.put("mchId", bean.getMchId());
		     mch_info act_info=mchinfoWapper.selectby(map).get(0);
			Logger.verifyEquals("200", call.getStatus1(), "验证返回成功status值");
	        Logger.verifyEquals("请求成功", call.getMessage(), "验证返回成功Message值");
	        Logger.verifyEquals(act_info.getMchShareType(), bean.getMchShareType(), "验证数据库mch_info 中字段MchShareType与传入的是否一致");
	        Logger.verifyEquals(act_info.getState(), bean.getMchStatus(), "验证数据库mch_info 中字段State与传入的MchStatus是否一致");
	        Logger.verifyEquals(act_info.getRemark(), bean.getRemark(), "验证数据库mch_info 中字段Remark与传入的Remark是否一致");
	        
			//验证消息总线
	        MessageListBean messageListBean=mqQueryCallService.initGodmchManage(String.valueOf(bean.getMchId()), "change_share_type");
	        List <Map> mq=mqQueryCallService.GetMqMessage(messageListBean);
	        if(mq.size()==0){
				Thread.sleep(5000);
				mq = MqQueryCallService.GetMqMessage(messageListBean);
			}
	        Logger.verifyEquals(mq.get(0).get("mchShareType"), bean.getMchShareType(), "验证消息总线分享类型MchShareType");
	        Logger.verifyEquals(mq.get(0).get("userId"),bean.getMchId(), "验证消息总线商户Id MchId");			
	        
		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	
	@Test
	@Category({P1.class})
	@TestCase
	@Ignore
	public void Tc_setShareType_005_2() {
		//mchShareType=5,独立小程序（继承版）  现在不存在此类型
		Logger.start(true,"反例-设置商户店铺分享方式信息（运营后台）-传入mchShareType=5,独立小程序（继承版） ");
		try {
			//渠道
			UserCreateBean usercreateBean1=DGUserCallService.initUsercreateBean();//初始化创建用户 为什么手机号没有值
			int userId_channl=DGUserCallService.UserCreateCall(usercreateBean1);
			
			createmchBean createmchbean=GodmchManageCallService.InitcreatemchBeanForChannel(userId_channl);
			GodmchManageCallService.createmchCallForChannel(createmchbean);
			editmchBean editmchbean = GodmchManageCallService.IniteditmachBean(userId_channl);
			GodmchManageCallService.editmachCall(editmchbean);
			
			bean.setMchId(userId_channl);
			bean.setMchShareType(5);
			bean.setMchStatus(0);
			bean.setRemark("test");
			//新字段
			bean.setPayMode(1);//支付方式:微信支付通道1：飞界国际2：飞界国际电子商务3：盛付通
			bean.setMchSideBuy(1);//商家端购买1：二维码购买 2：直接购买
			bean.setDualMode(0);//双店模式0：正常模式（默认）1：双店模式
			
//			bean=GodmchManageCallService.initsetShareTypeV2(userId_channl);
//			bean.setMchShareType(5);
//			bean.setMchStatus(0);
//			bean.setRemark("test");
			
			call.setData(bean);
			call.callService();			
			
			HashMap<String,Object> map=new HashMap();
			map.put("mchId", bean.getMchId());
		     mch_info act_info=mchinfoWapper.selectby(map).get(0);
			Logger.verifyEquals("200", call.getStatus1(), "验证返回成功status值");
	        Logger.verifyEquals("请求成功", call.getMessage(), "验证返回成功Message值");
	        Logger.verifyEquals(act_info.getMchShareType(), bean.getMchShareType(), "验证数据库mch_info 中字段MchShareType与传入的是否一致");
	        Logger.verifyEquals(act_info.getState(), bean.getMchStatus(), "验证数据库mch_info 中字段State与传入的MchStatus是否一致");
	        Logger.verifyEquals(act_info.getRemark(), bean.getRemark(), "验证数据库mch_info 中字段Remark与传入的Remark是否一致");
	        
			//验证消息总线
	        MessageListBean messageListBean=mqQueryCallService.initGodmchManage(String.valueOf(bean.getMchId()), "change_share_type");
	        List <Map> mq=mqQueryCallService.GetMqMessage(messageListBean);
	        if(mq.size()==0){
				Thread.sleep(5000);
				mq = MqQueryCallService.GetMqMessage(messageListBean);
			}
	        Logger.verifyEquals(mq.get(0).get("mchShareType"), bean.getMchShareType(), "验证消息总线分享类型MchShareType");
	        Logger.verifyEquals(mq.get(0).get("userId"),bean.getMchId(), "验证消息总线商户Id MchId");			
	        
		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	
	
	@Test
	@Category({P1.class})
	@TestCase
	public void Tc_setShareType_005_3() {
		Logger.start(true,"反例-设置商户店铺分享方式信息（运营后台）-传入mchShareType=6,分享方式不存在");
		try {
			//渠道
			UserCreateBean usercreateBean1=DGUserCallService.initUsercreateBean();//初始化创建用户 为什么手机号没有值
			int userId_channl=DGUserCallService.UserCreateCall(usercreateBean1);
			
			createmchBean createmchbean=GodmchManageCallService.InitcreatemchBeanForChannel(userId_channl);
			GodmchManageCallService.createmchCallForChannel(createmchbean);
			editmchBean editmchbean = GodmchManageCallService.IniteditmachBean(userId_channl);
			GodmchManageCallService.editmachCall(editmchbean);
			
			bean.setMchId(userId_channl);
			bean.setMchShareType(6);
			bean.setMchStatus(0);
			bean.setRemark("test");
			//新字段
			bean.setPayMode(1);//支付方式:微信支付通道1：飞界国际2：飞界国际电子商务3：盛付通
			bean.setMchSideBuy(1);//商家端购买1：二维码购买 2：直接购买
			bean.setDualMode(0);//双店模式0：正常模式（默认）1：双店模式
			call.setData(bean);
			call.callService();			
			
			Logger.verifyEquals("5000", call.getStatus1(), "验证返回成功status值");
	        Logger.verifyEquals("mchShareType 非法", call.getMessage(), "验证返回成功Message值");			
	        
		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	@Test
	@Category({P1.class})
	@TestCase
	public void Tc_setShareType_005_1() {
		Logger.start(true,"反例-设置商户店铺分享方式信息（运营后台）-传入status=1,店铺状态不存在");
		try {
			//渠道
			UserCreateBean usercreateBean1=DGUserCallService.initUsercreateBean();
			int userId_channl=DGUserCallService.UserCreateCall(usercreateBean1);
			
			createmchBean createmchbean=GodmchManageCallService.InitcreatemchBeanForChannel(userId_channl);
			GodmchManageCallService.createmchCallForChannel(createmchbean);
			editmchBean editmchbean = GodmchManageCallService.IniteditmachBean(userId_channl);
			GodmchManageCallService.editmachCall(editmchbean);
			
			bean.setMchId(userId_channl);
			bean.setMchShareType(1);
			bean.setMchStatus(1);
			bean.setRemark("test");
			//新字段
			bean.setPayMode(1);//支付方式:微信支付通道1：飞界国际2：飞界国际电子商务3：盛付通
			bean.setMchSideBuy(1);//商家端购买1：二维码购买 2：直接购买
			bean.setDualMode(0);//双店模式0：正常模式（默认）1：双店模式
			call.setData(bean);
			call.callService();			
			
			Logger.verifyEquals("5000", call.getStatus1(), "验证返回成功status值");
	        Logger.verifyEquals("mchStatus 非法", call.getMessage(), "验证返回成功Message值");	
			
		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	
	///////////////////设置支付通道//////////////////////
	@Test
	@Category({P1.class})
	@TestCase
	@Ignore
	public void Tc_setShareType_006() {
		Logger.start(true,"正例-切换到盛付通，渠道-没有代理-成功(20200407 盛付通单独一个字段domesticPayMode  微信国内支付通道)");
		try {
			//创建一个渠道商，单规格渠道商品，   获取到商品id
			Integer mchId = GodmchManageCallService.CreateSellerMch();
			bean.setMchId(mchId);
			bean.setMchShareType(1);
			bean.setMchStatus(0);
			bean.setRemark("test");
		
			bean.setPayMode(3);//支付方式:微信支付通道1：飞界国际2：飞界国际电子商务3：盛付通
			//新字段
			bean.setMchSideBuy(1);//商家端购买1：二维码购买 2：直接购买
			bean.setDualMode(0);//双店模式0：正常模式（默认）1：双店模式
			
			call.setData(bean);
			call.callService();
		    this.check_verify();
	        
	        
		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	
	
	@Test
	@Category({P1.class})
	@TestCase
	@Ignore
	public void Tc_setShareType_007() {
		//有下级代理时可以在飞界国际、飞界国际电子商务、飞界国际贸易之间切换，无法从飞界国际、飞界国际电子商务、飞界国际贸易切换到盛付通
		Logger.start(true,"切换到盛付通，渠道切盛付通-有代理-失败，作废20200304");
		try {
			
			
			Integer mchId = GodmchManageCallService.CreateSellerMch();
			//创建一个渠道商-代理
			List<createmchBean>  createmchList=GodmchManageCallService.InitcreatemchBeanForAgent(mchId);
			GodmchManageCallService.createmchCallForAgent(createmchList.toArray(new
					createmchBean[0]));
			bean.setMchId(mchId);
			bean.setMchShareType(1);
			bean.setMchStatus(0);
			bean.setRemark("test");
		
			bean.setPayMode(3);//支付方式:微信支付通道1：飞界国际2：飞界国际电子商务3：盛付通
			//新字段
			bean.setMchSideBuy(1);//商家端购买1：二维码购买 2：直接购买
			bean.setDualMode(0);//双店模式0：正常模式（默认）1：双店模式
			
			call.setData(bean);
			call.callService();
			Logger.verifyEquals(5000,call.getJsonObject().get("status").getAsInt(),"验证code");
		    Logger.verifyEquals(true,call.getJsonObject().get("msg").toString().contains("有下级代理的渠道商禁止切换支付通道"),"验证msg");
	        
	        
		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	
	@Test
	@Category({P1.class})
	@TestCase
	@Ignore
	public void Tc_setShareType_008() {
		//渠道商支付通道可选择：飞界国际、飞界国际电子商务，盛付通
		Logger.start(true,"切换到盛付通，代理-切盛付通-之前失败,优化后成功 (20200407 盛付通单独一个字段domesticPayMode  微信国内支付通道)");
		try {
			//创建一个渠道商，单规格渠道商品，   获取到商品id
			Integer mchId = GodmchManageCallService.CreateSellerMch();
			List<createmchBean>  createmchList=GodmchManageCallService.InitcreatemchBeanForAgent(mchId);
			GodmchManageCallService.createmchCallForAgent(createmchList.toArray(new
					createmchBean[0]));
			//设置前渠道的支付通道
			HashMap<String,Object> map=new HashMap();
			map.put("mchId", mchId);
		    mch_info mchId_channl1=mchinfoWapper.selectby(map).get(0);
		    
			bean.setMchId(createmchList.get(0).getMchId());
			bean.setMchShareType(1);
			bean.setMchStatus(0);
			bean.setRemark("test");
		
			bean.setPayMode(3);//支付方式:微信支付通道1：飞界国际2：飞界国际电子商务3：盛付通
			//新字段
			bean.setMchSideBuy(1);//商家端购买1：二维码购买 2：直接购买
			bean.setDualMode(0);//双店模式0：正常模式（默认）1：双店模式
			call.setData(bean);
			call.callService();
			
			map=new HashMap();
			map.put("mchId", bean.getMchId());
		    mch_info mchId_agent=mchinfoWapper.selectby(map).get(0);

			Logger.verifyEquals("200", call.getStatus1(), "验证返回成功status值");
	        Logger.verifyEquals("请求成功", call.getMessage(), "验证返回成功Message值");
	        Logger.verifyEquals(mchId_agent.getPayMode(), bean.getPayMode(), "验证数据库mch_info 中字段PayMode与传入的是否一致");
	        
			//设置后渠道的支付通道
			map=new HashMap();
			map.put("mchId", mchId);
		    mch_info mchId_channl2=mchinfoWapper.selectby(map).get(0);
			
		    Logger.verifyEquals(mchId_channl1.getPayMode(), mchId_channl2.getPayMode(), "验证设置前与设置后的渠道支付通道一致");
		    
//			Logger.verifyEquals(5000,call.getJsonObject().get("status").getAsInt(),"验证code");
//			Logger.verifyEquals(true,call.getJsonObject().get("msg").toString().contains("仅单一渠道商身份的商户才可切换支付通道"),"验证msg");
	        
	        
		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	
	
	@Test
	@Category({P1.class})
	@TestCase
	@Ignore
	public void Tc_setShareType_009() {
		//服务商身份，可以在飞界国际、飞界国际电子商务、飞界国际贸易之间切换，无法从飞界国际、飞界国际电子商务、飞界国际贸易切换到盛付通；
		Logger.start(true,"切换到盛付通，服务商切盛付通-失败(20200407 盛付通单独一个字段domesticPayMode  微信国内支付通道)");
		try {
			//创建一个渠道商，单规格渠道商品，   获取到商品id
			addProviderBean addProviderBean = GodmchManageCallService.InitAddProviderBean();
			addProviderCall addProviderCall=GodmchManageCallService.InitAddProviderCall(addProviderBean);
			
			bean.setMchId(addProviderBean.getProviderId());
			bean.setMchShareType(1);
			bean.setMchStatus(0);
			bean.setRemark("test");
		
			bean.setPayMode(3);//支付方式:微信支付通道1：飞界国际2：飞界国际电子商务3：盛付通
			//新字段
			bean.setMchSideBuy(1);//商家端购买1：二维码购买 2：直接购买
			bean.setDualMode(0);//双店模式0：正常模式（默认）1：双店模式
			
			call.setData(bean);
			call.callService();
			Logger.verifyEquals(5000,call.getJsonObject().get("status").getAsInt(),"验证code");
			Logger.verifyEquals(true,call.getJsonObject().get("msg").toString().contains("服务商无法使用盛付通"),"验证msg");
	        
	        
		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	
	
	
	@Test
	@Category({P1.class})
	@TestCase
	public void Tc_setShareType_010() {
	    Logger.start(true, "切换到盛付通，服务商-有商户-失败");
		try {
			Integer mchId = GodmchManageCallService.CreateSellerMch();
			//创建一个渠道商，单规格渠道商品，   获取到商品id
			addProviderBean addProviderBean = GodmchManageCallService.InitAddProviderBean();
			addProviderCall addProviderCall=GodmchManageCallService.InitAddProviderCall(addProviderBean);
			
			GodmchManageCallService.InitAddServiceRelation(addProviderBean.getProviderId(),mchId,1);

			bean.setMchId(addProviderBean.getProviderId());
			bean.setMchShareType(1);
			bean.setMchStatus(0);
			bean.setRemark("test");
		
			bean.setPayMode(3);//支付方式:微信支付通道1：飞界国际2：飞界国际电子商务3：盛付通
			//新字段
			bean.setMchSideBuy(1);//商家端购买1：二维码购买 2：直接购买
			bean.setDualMode(0);//双店模式0：正常模式（默认）1：双店模式
			
			call.setData(bean);
			call.callService();
			Logger.verifyEquals(5000,call.getJsonObject().get("status").getAsInt(),"验证code");
			Logger.verifyEquals(true,call.getJsonObject().get("msg").toString().contains("服务商无法使用盛付通"),"验证msg");
	        
	        
		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	
	
	@Test
	@Category({P1.class})
	@TestCase
	@Ignore
	public void Tc_setShareType_011() {
		//服务商身份，可以在飞界国际、飞界国际电子商务、飞界国际贸易之间切换，无法从飞界国际、飞界国际电子商务、飞界国际贸易切换到盛付通；服务商无法使用盛付通
		Logger.start(true, "切换到盛付通，服务商-有商户-商户切换盛付通-之前失败,优化后成功(20200407 盛付通单独一个字段domesticPayMode  微信国内支付通道)");
		try {
			Integer mchId = GodmchManageCallService.CreateSellerMch();
			//创建一个渠道商，单规格渠道商品，   获取到商品id
			addProviderBean addProviderBean = GodmchManageCallService.InitAddProviderBean();
			addProviderCall addProviderCall=GodmchManageCallService.InitAddProviderCall(addProviderBean);
			
			GodmchManageCallService.InitAddServiceRelation(addProviderBean.getProviderId(),mchId,1);

			bean.setMchId(mchId);
			bean.setMchShareType(1);
			bean.setMchStatus(0);
			bean.setRemark("test");
		
			bean.setPayMode(3);//支付方式:微信支付通道1：飞界国际2：飞界国际电子商务3：盛付通
			//新字段
			bean.setMchSideBuy(1);//商家端购买1：二维码购买 2：直接购买
			bean.setDualMode(0);//双店模式0：正常模式（默认）1：双店模式
			
			call.setData(bean);
			call.callService();
    		this.check_pay(mchId);
    		
//			Logger.verifyEquals(5000,call.getJsonObject().get("status").getAsInt(),"验证code");
//			Logger.verifyEquals(true,call.getJsonObject().get("msg").toString().contains("与服务商有绑定关系禁止切换支付通道"),"验证msg");
	        
	        
		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	
	
	
	
	@Test
	@Category({P1.class})
	@TestCase
	@Ignore
	public void Tc_setShareType_012() {
		//服务商身份，可以在飞界国际、飞界国际电子商务、飞界国际贸易之间切换，无法从飞界国际、飞界国际电子商务、飞界国际贸易切换到盛付通；服务商无法使用盛付通
		Logger.start(true, "切换到盛付通，独立小程序-失败");
		try {
			//创建一个渠道商，单规格渠道商品，   获取到商品id
			Integer mchId = GodmchManageCallService.CreateSellerMch();
			//GodmchManageCallService.initSetShareType(mchId,3);
			bean.setMchId(mchId);
			bean.setMchShareType(3);
			bean.setMchStatus(0);
			bean.setRemark("test");
		
			bean.setPayMode(3);//支付方式:微信支付通道1：飞界国际2：飞界国际电子商务3：盛付通
			//新字段
			bean.setMchSideBuy(1);//商家端购买1：二维码购买 2：直接购买
			bean.setDualMode(0);//双店模式0：正常模式（默认）1：双店模式
			
			call.setData(bean);
			call.callService();

			
			Logger.verifyEquals(5000,call.getJsonObject().get("status").getAsInt(),"验证code");
			Logger.verifyEquals(true,call.getJsonObject().get("msg").toString().contains("服务商无法使用盛付通"),"验证msg");	        
	        
		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	
	@Test
	@Category({P1.class})
	@TestCase
	@Ignore
	public void Tc_setShareType_013() {
		Logger.start(true, "切换到盛付通，独立H5-失败");
		try {
			//创建一个渠道商，单规格渠道商品，   获取到商品id
			Integer mchId = GodmchManageCallService.CreateSellerMch();
			//GodmchManageCallService.initSetShareType(mchId,4);
			bean.setMchId(mchId);
			bean.setMchShareType(4);
			bean.setMchStatus(0);
			bean.setRemark("test");
		
			bean.setPayMode(3);//支付方式:微信支付通道1：飞界国际2：飞界国际电子商务3：盛付通
			//新字段
			bean.setMchSideBuy(1);//商家端购买1：二维码购买 2：直接购买
			bean.setDualMode(0);//双店模式0：正常模式（默认）1：双店模式
			
			call.setData(bean);
			call.callService();

			Logger.verifyEquals(5000,call.getJsonObject().get("status").getAsInt(),"验证code");
			Logger.verifyEquals(true,call.getJsonObject().get("msg").toString().contains("仅单一渠道商身份的商户才可切换支付通道"),"验证msg");       
	        
		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	
	@Test
	@Category({P1.class})
	@TestCase
	@Ignore
	public void Tc_setShareType_014() {
		Logger.start(true, "切换到盛付通，独立商户-失败(20200407 盛付通单独一个字段domesticPayMode  微信国内支付通道)");
		try {
			
			createIndepMchBean createIndepMchBean=GodmchManageCallService.InitCreateIndepMchBean();
			createIndepMchCall createIndepMchCall=GodmchManageCallService.CreateIndepMchCall(createIndepMchBean);
			
			bean.setMchId(createIndepMchCall.getmchId());
			bean.setMchShareType(1);
			bean.setMchStatus(0);
			bean.setRemark("test");
		
			bean.setPayMode(3);
			//新字段
			bean.setMchSideBuy(1);//商家端购买1：二维码购买 2：直接购买
			bean.setDualMode(0);//双店模式0：正常模式（默认）1：双店模式
			
			call.setData(bean);
			call.callService();

			// 获取客服信息
			Map<String, Object> map = new HashMap();
			map.put("mchId", createIndepMchCall.getmchId());
			mch_info mchInfo = mchInfoWapper.selectby(map).get(0);
		    Logger.verifyEquals(3, mchInfo.getPayMode(), "验证paymode=3");      
	        
		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	
	
	@Test
	@Category({P1.class})
	@TestCase
	public void Tc_setShareType_015() {
		Logger.start(true, "切换到盛付通，商户id不存在");
		try {
			bean.setMchId(111);
			bean.setMchShareType(3);
			bean.setMchStatus(0);
			bean.setRemark("test");
		
			bean.setPayMode(3);
			//新字段
			bean.setMchSideBuy(1);//商家端购买1：二维码购买 2：直接购买
			bean.setDualMode(0);//双店模式0：正常模式（默认）1：双店模式
			
			call.setData(bean);
			call.callService();

			Logger.verifyEquals(5004,call.getJsonObject().get("status").getAsInt(),"验证code");
			Logger.verifyEquals(true,call.getJsonObject().get("msg").toString().contains("商户不存在"),"验证msg");    
	        
		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	
	
	@Test
	@Category({P1.class})
	@TestCase
	public void Tc_setShareType_016() {
		Logger.start(true, "切换到支付宝支付通道-1：飞界国际，渠道-没有代理-成功");
	try {
		//创建一个渠道商，单规格渠道商品，   获取到商品id
			Integer mchId = GodmchManageCallService.CreateSellerMch();
			bean.setMchId(mchId);	
			bean.setMchShareType(2);/**分享方式1：小程序 2：H5 3：独立小程序  4：独立h5  5：继承版小程序*/
			bean.setMchStatus(0);
			bean.setRemark("test");
			
			bean.setPayMode(1);//微信HipoPay支付通道:微信支付通道1：飞界国际2：飞界国际电子商务3：盛付通 4:飞界国际贸易 5：自有支付
			bean.setAliPayMode(1);
			//新字段
			bean.setMchSideBuy(1);//商家端购买1：二维码购买 2：直接购买
			bean.setDualMode(0);//双店模式0：正常模式（默认）1：双店模式
			bean.setDomesticPayMode(1);//微信国内支付通道:0：不支持  1：盛付通
			call.setData(bean);
			call.callService();

			// 获取客服信息
			Map<String, Object> map = new HashMap();
			map.put("mchId", mchId);
			mch_info mchInfo = mchInfoWapper.selectby(map).get(0);
		    Logger.verifyEquals(1, mchInfo.getPayMode(), "验证paymode=1");
		    Logger.verifyEquals(1, mchInfo.getAliPayMode(), "验证AliPayMode=1");    
	        
		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	
	
	@Test
	@Category({P1.class})
	@TestCase
	@Ignore
	public void Tc_setShareType_017() {
		//新增支付宝支付通道 20191224
		Logger.start(true, "切换到支付宝支付通道-1：飞界国际，设置有代理的渠道-渠道设置成功，代理不变-成功(失败 独立小程序不能使用支付宝飞界国际)");
		try {
			CreateCodeBean ccbean = GodmchManageCallService.CreateAllMsgSellerMch();
			GodmchManageCallService.SetVip(ccbean.getMchId());
			String code = GodmchManageCallService.createCodeCall(ccbean).getCode();
			Integer agentid = GodmchManageCallService.CreateSellerMch(code);
			
			bean.setMchId(ccbean.getMchId());
			bean.setMchShareType(3);
			bean.setMchStatus(0);
			bean.setRemark("test");
		
			bean.setPayMode(5);//微信HipoPay支付通道:微信支付通道1：飞界国际2：飞界国际电子商务3：盛付通 4:飞界国际贸易 5：自有支付
			bean.setAliPayMode(1);
			//新字段
			bean.setMchSideBuy(1);//商家端购买1：二维码购买 2：直接购买
			bean.setDualMode(0);//双店模式0：正常模式（默认）1：双店模式
			
			call.setData(bean);
			call.callService();
			Logger.verifyEquals(200,call.getJsonObject().get("status").getAsInt(),"验证code");
			// 获取渠道信息
			Map<String, Object> map = new HashMap();
			map.put("mchId", ccbean.getMchId());
			mch_info mchInfo = mchInfoWapper.selectby(map).get(0);
		    Logger.verifyEquals(2, mchInfo.getPayMode(), "验证渠道paymode=2");
		    Logger.verifyEquals(1, mchInfo.getAliPayMode(), "验证渠道AliPayMode=1");
		    //获取代理
			Map<String, Object> map2 = new HashMap();
			map2.put("mchId",agentid);
			mch_info mchInfo2 = mchInfoWapper.selectby(map2).get(0);
			Logger.verifyEquals(2, mchInfo2.getPayMode(), "验证代理paymode=2");
		    Logger.verifyEquals(0, mchInfo2.getAliPayMode(), "验证代理AliPayMode=0");   
	        
		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	
	
	@Test
	@Category({P1.class})
	@TestCase
	public void Tc_setShareType_018() {
		Logger.start(true, "切换到支付宝支付通道-1：飞界国际，设置代理-代理设置成功，渠道不变-成功");
		try {
			//新增支付宝支付通道 20191224
			CreateCodeBean ccbean = GodmchManageCallService.CreateAllMsgSellerMch();
			GodmchManageCallService.SetVip(ccbean.getMchId());
			String code = GodmchManageCallService.createCodeCall(ccbean).getCode();
			Integer agentid = GodmchManageCallService.CreateSellerMch(code);
			
			bean.setMchId(agentid);
			bean.setMchShareType(2);/**分享方式1：小程序 2：H5 3：独立小程序  4：独立h5  5：继承版小程序*/
			bean.setMchStatus(0);
			bean.setRemark("test");
		
			bean.setPayMode(2);
			bean.setAliPayMode(1);
			//新字段
			bean.setMchSideBuy(1);//商家端购买1：二维码购买 2：直接购买
			bean.setDualMode(0);//双店模式0：正常模式（默认）1：双店模式
			
			call.setData(bean);
			call.callService();
			Logger.verifyEquals(200,call.getJsonObject().get("status").getAsInt(),"验证code");
			// 获取渠道信息
			Map<String, Object> map = new HashMap();
			map.put("mchId", ccbean.getMchId());
			mch_info mchInfo = mchInfoWapper.selectby(map).get(0);
		    Logger.verifyEquals(2, mchInfo.getPayMode(), "验证渠道paymode=2");
		    Logger.verifyEquals(0, mchInfo.getAliPayMode(), "验证渠道AliPayMode=0");
		    //获取代理
			Map<String, Object> map2 = new HashMap();
			map2.put("mchId",agentid);
			mch_info mchInfo2 = mchInfoWapper.selectby(map2).get(0);
		    Logger.verifyEquals(2, mchInfo2.getPayMode(), "验证代理paymode=2");
		    Logger.verifyEquals(1, mchInfo2.getAliPayMode(), "验证代理AliPayMode=1");  
	        
		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	
	

	
	@Test
	@Category({P1.class})
	@TestCase
	@Ignore
	public void Tc_setShareType_020() {
		Logger.start(true, "双店模式下，无法切成H5-失败");
		try {
	
			//渠道
			UserCreateBean usercreateBean1=DGUserCallService.initUsercreateBean();//初始化创建用户 为什么手机号没有值
			int userId_channl=DGUserCallService.UserCreateCall(usercreateBean1);
			
			createmchBean createmchbean=GodmchManageCallService.InitcreatemchBeanForChannel(userId_channl);
			GodmchManageCallService.createmchCallForChannel(createmchbean);
			editmchBean editmchbean = GodmchManageCallService.IniteditmachBean(userId_channl);
			GodmchManageCallService.editmachCall(editmchbean);
			
			bean.setMchId(userId_channl);
			bean.setMchShareType(2);//分享方式1：小程序 2：H5 3：独立小程序  4：独立h5  5：继承版小程序
			bean.setMchStatus(0);
			bean.setRemark("test");
		
			bean.setPayMode(3);//支付方式:微信支付通道1：飞界国际2：飞界国际电子商务3：盛付通
			bean.setAliPayMode(1);//支付宝支付通道0：不支持支付宝 1：飞界国际
			//新字段
			bean.setMchSideBuy(1);//商家端购买1：二维码购买 2：直接购买
			bean.setDualMode(1);//双店模式0：正常模式（默认）1：双店模式
			
			call.setData(bean);
			call.callService();
			//Logger.verifyEquals(200,call.getJsonObject().get("status").getAsInt(),"验证code");
			Logger.verifyEquals(false,true,"");
	        
		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	
	@Test
	@Category({P1.class})
	@TestCase
	@Ignore
	public void Tc_setShareType_021() {
		Logger.start(true, "双店模式下，无法切成独立H5-失败");
		try {
	
			//渠道
			UserCreateBean usercreateBean1=DGUserCallService.initUsercreateBean();//初始化创建用户 为什么手机号没有值
			int userId_channl=DGUserCallService.UserCreateCall(usercreateBean1);
			
			createmchBean createmchbean=GodmchManageCallService.InitcreatemchBeanForChannel(userId_channl);
			GodmchManageCallService.createmchCallForChannel(createmchbean);
			editmchBean editmchbean = GodmchManageCallService.IniteditmachBean(userId_channl);
			GodmchManageCallService.editmachCall(editmchbean);
			
			bean.setMchId(userId_channl);
			bean.setMchShareType(4);//分享方式1：小程序 2：H5 3：独立小程序  4：独立h5  5：继承版小程序
			bean.setMchStatus(0);
			bean.setRemark("test");
		
			bean.setPayMode(3);//支付方式:微信支付通道1：飞界国际2：飞界国际电子商务3：盛付通
			bean.setAliPayMode(1);//支付宝支付通道0：不支持支付宝 1：飞界国际
			//新字段
			bean.setMchSideBuy(1);//商家端购买1：二维码购买 2：直接购买
			bean.setDualMode(1);//双店模式0：正常模式（默认）1：双店模式
			
			call.setData(bean);
			call.callService();
			//Logger.verifyEquals(200,call.getJsonObject().get("status").getAsInt(),"验证code");
			Logger.verifyEquals(false,true,"");
	        
		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	
	
	@Test
	@Category({P1.class})
	@TestCase
	@Ignore
	public void Tc_setShareType_022() {
		Logger.start(true, "支付通道是盛付通-不能选择直接购买(作废，产品删除此业务)");
		try {
	
			//渠道
			UserCreateBean usercreateBean1=DGUserCallService.initUsercreateBean();//初始化创建用户 为什么手机号没有值
			int userId_channl=DGUserCallService.UserCreateCall(usercreateBean1);
			
			createmchBean createmchbean=GodmchManageCallService.InitcreatemchBeanForChannel(userId_channl);
			GodmchManageCallService.createmchCallForChannel(createmchbean);
			editmchBean editmchbean = GodmchManageCallService.IniteditmachBean(userId_channl);
			GodmchManageCallService.editmachCall(editmchbean);
			
			bean.setMchId(userId_channl);
			bean.setMchShareType(4);//分享方式1：小程序 2：H5 3：独立小程序  4：独立h5  5：继承版小程序
			bean.setMchStatus(0);
			bean.setRemark("test");
		
			bean.setPayMode(3);//支付方式:微信支付通道1：飞界国际2：飞界国际电子商务3：盛付通
			bean.setAliPayMode(1);//支付宝支付通道0：不支持支付宝 1：飞界国际
			//新字段
			bean.setMchSideBuy(2);//商家端购买1：二维码购买 2：直接购买
			bean.setDualMode(1);//双店模式0：正常模式（默认）1：双店模式
			
			call.setData(bean);
			call.callService();
			
			Logger.verifyEquals("5000",call.getStatus1(),"验证status");
			Logger.verifyEquals(true,call.getMessage().contains("盛付通无法开启商家端直接购买"),"验证message");
	        
		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	
	
	@Test
	@Category({P1.class})
	@TestCase

	public void Tc_setShareType_023() {
		Logger.start(true, "纯代理无法开启双店模式");
		try {
			//渠道
			UserCreateBean usercreateBean1=DGUserCallService.initUsercreateBean();//初始化创建用户 为什么手机号没有值
			int userId_channl=DGUserCallService.UserCreateCall(usercreateBean1);
			
			//代理
			usercreateBean1=DGUserCallService.initUsercreateBean();
			int userId_agent=DGUserCallService.UserCreateCall(usercreateBean1);
			
			createmchBean createmchbean=GodmchManageCallService.InitcreatemchBeanForChannel(userId_channl);
			GodmchManageCallService.createmchCallForChannel(createmchbean);
			editmchBean editmchbean = GodmchManageCallService.IniteditmachBean(userId_channl);
			GodmchManageCallService.editmachCall(editmchbean);
			
			List<createmchBean> createmchList=GodmchManageCallService.InitcreatemchBeanForAgent(userId_channl, userId_agent);
			createmchList.get(0).setCountry("CHN");
			GodmchManageCallService.createmchCallForAgent(createmchList.toArray(new
					createmchBean[createmchList.size()]));
			editmchBean editmchbean2 = GodmchManageCallService.IniteditmachBean(userId_agent);
			GodmchManageCallService.editmachCall(editmchbean2);
			
			bean.setMchId(userId_agent);
			bean.setMchShareType(4);//分享方式1：小程序 2：H5 3：独立小程序  4：独立h5  5：继承版小程序
			bean.setMchStatus(0);
			bean.setRemark("test");
		
			bean.setPayMode(2);//支付方式:微信支付通道1：飞界国际2：飞界国际电子商务3：盛付通
			bean.setAliPayMode(1);//支付宝支付通道0：不支持支付宝 1：飞界国际
			//新字段
			bean.setMchSideBuy(2);//商家端购买1：二维码购买 2：直接购买
			bean.setDualMode(1);//双店模式0：正常模式（默认）1：双店模式
			
			call.setData(bean);
			call.callService();
			
			Logger.verifyEquals("5000",call.getStatus1(),"验证status");
			Logger.verifyEquals(true,call.getMessage().contains("纯代理商无法开启双店模式"),"验证message");
	        
		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	//风控业务 update 20200227 summing
	@Test
	@Category({P1.class})
	@TestCase
	public void Tc_setShareType_024() {
		Logger.start(true, "若商户支付通道微信：飞界国际,受约束-输入风控条件-成功");
		try {
	
			bean= initSetShareType();
			bean.setPayMode(1);//支付方式:微信支付通道1：飞界国际2：飞界国际电子商务3：盛付通
			call.setData(bean);
			call.callService();
			
			check_verify(true);
 
		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	
	
	@Test
	@Category({P1.class})
	@TestCase
	@Ignore
	public void Tc_setShareType_025() {
		//20200407 修改 分享类型是公共版小程序时，支付通道自动切到Hipopay-飞界国际，不可切换
		Logger.start(true, "若商户支付通道 微信：飞界国际电子商务,受约束-输入风控条件-成功");
		try {
	
			bean= initSetShareType();
			bean.setPayMode(2);//支付方式:微信支付通道1：飞界国际2：飞界国际电子商务3：盛付通
			call.setData(bean);
			call.callService();
			
			check_verify(true);
 
		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	
	@Test
	@Category({P1.class})
	@TestCase
	@Ignore
	public void Tc_setShareType_026() {
		//20200407 修改 分享类型是公共版小程序时，支付通道自动切到Hipopay-飞界国际，不可切换
		Logger.start(true, "若商户支付通道是支付宝： 飞界国际,受约束-输入风控条件-成功");
		try {
			
			bean= initSetShareType();
			bean.setAliPayMode(1);//支付宝支付通道0：不支持支付宝 1：飞界国际
			
			call.setData(bean);
			call.callService();
			
			check_verify(true);
 
		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	
	@Test
	@Category({P1.class})
	@TestCase
	@Ignore
	public void Tc_setShareType_027() {
		//20200407 修改 分享类型是公共版小程序时，支付通道自动切到Hipopay-飞界国际，不可切换
		Logger.start(true, "若商户支付通道微信：盛付通；支付宝：飞界国际,受约束-输入风控条件-成功");
		try {
			
			bean= initSetShareType();
			bean.setPayMode(3);//支付方式:微信支付通道1：飞界国际2：飞界国际电子商务3：盛付通
			bean.setAliPayMode(1);//支付宝支付通道0：不支持支付宝 1：飞界国际
			
			call.setData(bean);
			call.callService();
			
			check_verify(true);
 
		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	
	@Test
	@Category({P1.class})
	@TestCase
	@Ignore
	public void Tc_setShareType_028() {
		//20200407 修改 之前盛付通与paymodel是一个字段 ，现在盛付通独立字段DomesticPayMode，现在不管DomesticPayMode，之前的paymodel=3 也不会出现，所以关于盛付通不风控
		Logger.start(true, "若没有开双店，支付通道 微信：盛付通，不受约束-输入风控条件-无效");
		try {
	
			bean= initSetShareType();
			bean.setPayMode(1);//支付方式:微信支付通道1：飞界国际2：飞界国际电子商务3：盛付通
			bean.setDomesticPayMode(1);//修改 20200407 微信国内支付通道:0：不支持  1：盛付通
			
			call.setData(bean);
			call.callService();
			
			check_verify(false);
 
		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	
	
	@Test
	@Category({P1.class})
	@TestCase
	@Ignore
	public void Tc_setShareType_029() {
		Logger.start(true, "若开双店模式，支付通道 微信：盛付通，受约束-输入风控条件-成功");
		try {
	
			bean= initSetShareType();
			bean.setDualMode(1);//双店模式0：正常模式（默认）1：双店模式
			bean.setPayMode(3);//支付方式:微信支付通道1：飞界国际2：飞界国际电子商务3：盛付通
			
			call.setData(bean);
			call.callService();
			
			check_verify(true);
 
		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	@Test
	@Category({P1.class})
	@TestCase
	@Ignore
	public void Tc_setShareType_030() {
		Logger.start(true, "若开双店模式，支付通道 微信：盛付通，但是独立小程序,不受约束-输入风控条件-无效");
		try {
	
			bean= initSetShareType();
			bean.setDualMode(1);//双店模式0：正常模式（默认）1：双店模式
			bean.setPayMode(3);//支付方式:微信支付通道1：飞界国际2：飞界国际电子商务3：盛付通
			bean.setMchShareType(3);//分享方式1：小程序 2：H5 3：独立小程序  4：独立h5  5：继承版小程序
			call.setData(bean);
			call.callService();
			
			check_verify(false);
 
		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	
	@Test
	@Category({P1.class})
	@TestCase
	@Ignore
	public void Tc_setShareType_031() {
		Logger.start(true, "若开双店模式，支付通道 微信：盛付通，但是独立H5,不受约束-输入风控条件-无效");
		try {
	
			bean= initSetShareType();
			bean.setDualMode(1);//双店模式0：正常模式（默认）1：双店模式
			bean.setPayMode(3);//支付方式:微信支付通道1：飞界国际2：飞界国际电子商务3：盛付通
			bean.setMchShareType(4);//分享方式1：小程序 2：H5 3：独立小程序  4：独立h5  5：继承版小程序
			call.setData(bean);
			call.callService();
			
			check_verify(false);
 
		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	@Test
	@Category({P1.class})
	@TestCase
	@Ignore
	public void Tc_setShareType_032() {
		Logger.start(true, "若开双店模式，支付通道 微信：盛付通，但是独立H5,不受约束-输入风控条件-无效");
		try {
	
			bean= initSetShareType();
			bean.setDualMode(1);//双店模式0：正常模式（默认）1：双店模式
			bean.setPayMode(3);//支付方式:微信支付通道1：飞界国际2：飞界国际电子商务3：盛付通
			bean.setMchShareType(5);//分享方式1：小程序 2：H5 3：独立小程序  4：独立h5  5：继承版小程序
			call.setData(bean);
			call.callService();
			
			check_verify(false);
 
		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	@Test
	@Category({P1.class})
	@TestCase
	@Ignore
	public void Tc_setShareType_033() {
		Logger.start(true, "若未开双店模式，支付通道 微信：盛付通，但是独立小程序,不受约束-输入风控条件-无效");
		try {
	
			bean= initSetShareType();
			bean.setDualMode(0);//双店模式0：正常模式（默认）1：双店模式
			bean.setPayMode(3);//支付方式:微信支付通道1：飞界国际2：飞界国际电子商务3：盛付通
			bean.setMchShareType(3);//分享方式1：小程序 2：H5 3：独立小程序  4：独立h5  5：继承版小程序
			call.setData(bean);
			call.callService();
			
			check_verify(false);
 
		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	@Test
	@Category({P1.class})
	@TestCase
	@Ignore
	public void Tc_setShareType_034() {
		Logger.start(true, "若未开双店模式，支付通道 微信：盛付通，但是独立H5,不受约束-输入风控条件-无效");
		try {
	
			bean= initSetShareType();
			bean.setDualMode(0);//双店模式0：正常模式（默认）1：双店模式
			bean.setPayMode(3);//支付方式:微信支付通道1：飞界国际2：飞界国际电子商务3：盛付通
			bean.setMchShareType(4);//分享方式1：小程序 2：H5 3：独立小程序  4：独立h5  5：继承版小程序
			call.setData(bean);
			call.callService();
			
			check_verify(false);
 
		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	@Test
	@Category({P1.class})
	@TestCase
	@Ignore
	public void Tc_setShareType_035() {
		Logger.start(true, "若未开双店模式，支付通道 微信：盛付通，但是独立小程序继承版,不受约束-输入风控条件-无效");
		try {
	
			bean= initSetShareType();
			bean.setDualMode(0);//双店模式0：正常模式（默认）1：双店模式
			bean.setPayMode(3);//支付方式:微信支付通道1：飞界国际2：飞界国际电子商务3：盛付通
			bean.setMchShareType(5);//分享方式1：小程序 2：H5 3：独立小程序  4：独立h5  5：继承版小程序
			call.setData(bean);
			call.callService();
			
			check_verify(false);
 
		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	@Test
	@Category({P1.class})
	@TestCase
	public void Tc_setShareType_036() {
		Logger.start(true, "若商户类型是纯代理，不受约束-输入风控条件-无效");
		try {
			//查询之前的微信支付类型
			HashMap<String,Object> map=new HashMap();
			map.put("mchId", bean.getMchId());
		    mch_info act_info=mchinfoWapper.selectby(map).get(0);
		    
			bean= initSetShareType();
			//代理
			UserCreateBean usercreateBean1=DGUserCallService.initUsercreateBean();
			int userId_agent=DGUserCallService.UserCreateCall(usercreateBean1);
			//创建代理
			List<createmchBean> createmchList=GodmchManageCallService.InitcreatemchBeanForAgent(bean.getMchId(), userId_agent);
			createmchList.get(0).setCountry("CHN");
			GodmchManageCallService.createmchCallForAgent(createmchList.toArray(new
					createmchBean[createmchList.size()]));
			editmchBean editmchbean2 = GodmchManageCallService.IniteditmachBean(userId_agent);
			GodmchManageCallService.editmachCall(editmchbean2);
			
			bean.setMchId(userId_agent);
			
			bean.setPayMode(1);//支付方式:微信支付通道1：飞界国际2：飞界国际电子商务3：盛付通
			bean.setMchShareType(1);//分享方式1：小程序 2：H5 3：独立小程序  4：独立h5  5：继承版小程序
			call.setData(bean);
			call.callService();
			
			check_verify(false);
 
		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	
	@Test
	@Category({P1.class})
	@TestCase
	public void Tc_setShareType_036_1() {
		Logger.start(true, "纯渠道，下级是纯代理，输入风控条件，渠道风控约束，代理风控不约束");
		try {
			//查询之前的微信支付类型
			HashMap<String,Object> map=new HashMap();
			map.put("mchId", bean.getMchId());
		    mch_info act_info=mchinfoWapper.selectby(map).get(0);
		    
			bean= initSetShareType();
			//代理
			UserCreateBean usercreateBean1=DGUserCallService.initUsercreateBean();
			int userId_agent=DGUserCallService.UserCreateCall(usercreateBean1);
			//创建代理
			List<createmchBean> createmchList=GodmchManageCallService.InitcreatemchBeanForAgent(bean.getMchId(), userId_agent);
			createmchList.get(0).setCountry("CHN");
			GodmchManageCallService.createmchCallForAgent(createmchList.toArray(new
					createmchBean[createmchList.size()]));
			editmchBean editmchbean2 = GodmchManageCallService.IniteditmachBean(userId_agent);
			GodmchManageCallService.editmachCall(editmchbean2);
			
			bean.setMchId(bean.getMchId());
			
//			bean.setPayMode(act_info.getPayMode());//支付方式:微信支付通道1：飞界国际2：飞界国际电子商务3：盛付通
//			bean.setMchShareType(1);//分享方式1：小程序 2：H5 3：独立小程序  4：独立h5  5：继承版小程序
			bean.setProductRiskAmount(new BigDecimal(20000));
			bean.setTradeRiskAmount(new BigDecimal(25000));
			
			call.setData(bean);
			call.callService();
			
	        mch_configExample example=new mch_configExample();
	        example.createCriteria().andMchIdEqualTo(bean.getMchId());
	        mch_config mchconfig=mchconfigWapper.selectByExample(example).get(0);
			Logger.verifyEquals("200", call.getStatus1(), "验证返回成功status值");
	        Logger.verifyEquals("请求成功", call.getMessage(), "验证返回成功Message值");

	        //风控字段
	         Logger.verifyEquals(mchconfig.getProductRiskAmount().stripTrailingZeros().toPlainString(), bean.getProductRiskAmount().stripTrailingZeros().toPlainString(), "验证数据库mch_confog 中字段ProductRiskAmount与传入的ProductRiskAmount是否一致");
	         Logger.verifyEquals(mchconfig.getTradeRiskAmount().stripTrailingZeros().toPlainString(), bean.getTradeRiskAmount().stripTrailingZeros().toPlainString(), "验证数据库mch_confog 中字段TradeRiskAmount与传入的TradeRiskAmount是否一致");
	        //添加渠道下的第一次代理也设置与渠道一致 验证
	         example.clear();
	         example.createCriteria().andMchIdEqualTo(userId_agent);
	         List<mch_config> mchconfigs=mchconfigWapper.selectByExample(example);
	         Logger.verifyEquals(true,mchconfigs.size()==0, "验证代理不进数据库mch_config,不受限制");
	         
	         
//		     Logger.verifyEquals("0",mchconfig.getProductRiskAmount().stripTrailingZeros().toPlainString(), "验证数据库mch_confog 中字段ProductRiskAmount=0,不受限制");
//	         Logger.verifyEquals("0",mchconfig.getTradeRiskAmount().stripTrailingZeros().toPlainString(), "验证数据库mch_confog 中字段getTradeRiskAmount=0,不受限制");
	          
 
		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	@Test
	@Category({P1.class})
	@TestCase
	public void Tc_setShareType_037() {
		Logger.start(true, "商户类型是渠道商老用户-输入风控条件-成功");
		try {
	
			bean= initSetShareType();
			bean.setMchId(500000021);
			bean.setDualMode(0);//双店模式0：正常模式（默认）1：双店模式
			bean.setPayMode(1);//支付方式:微信支付通道1：飞界国际2：飞界国际电子商务3：盛付通
			bean.setMchShareType(1);//分享方式1：小程序 2：H5 3：独立小程序  4：独立h5  5：继承版小程序
			call.setData(bean);
			call.callService();
			
			check_verify(true);
 
		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	

	
	@Test
	@Category({P1.class})
	@TestCase
	public void Tc_setShareType_038() {
		Logger.start(true, "商户类型是渠道商的独立商户老用户-输入风控条件-无效");
		try {
	
			bean= initSetShareType();
			
			createIndepMchBean createIndepMchBean=GodmchManageCallService.InitCreateIndepMchBean();
			createIndepMchCall createIndepMchCall=GodmchManageCallService.CreateIndepMchCall(createIndepMchBean);
			bean.setMchId(createIndepMchCall.getmchId());
			
			bean.setDualMode(0);//双店模式0：正常模式（默认）1：双店模式
			bean.setPayMode(1);//支付方式:微信支付通道1：飞界国际2：飞界国际电子商务3：盛付通
			bean.setMchShareType(1);//分享方式1：小程序 2：H5 3：独立小程序  4：独立h5  5：继承版小程序
			call.setData(bean);
			call.callService();
			
			check_verify(false);
 
		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	
	
	@Test
	@Category({P1.class})
	@TestCase
	public void Tc_setShareType_039() {
		Logger.start(true, "验证商品风控值-ProductRiskAmount=0-成功");
		try {
	
			bean= initSetShareType();
			bean.setProductRiskAmount(new BigDecimal("0"));
			bean.setPayMode(1);//支付方式:微信支付通道1：飞界国际2：飞界国际电子商务3：盛付通
			call.setData(bean);
			call.callService();
			
			//双店模式
	        mch_configExample example=new mch_configExample();
	        example.createCriteria().andMchIdEqualTo(bean.getMchId());
	        mch_config mchconfig=mchconfigWapper.selectByExample(example).get(0);

			Logger.verifyEquals("200", call.getStatus1(), "验证返回成功status值");
	        Logger.verifyEquals("请求成功", call.getMessage(), "验证返回成功Message值");
	        Logger.verifyEquals("0", bean.getProductRiskAmount().stripTrailingZeros().toPlainString(), "验证数据库mch_confog 中字段ProductRiskAmount与传入的ProductRiskAmount是否一致");
	        Logger.verifyEquals(mchconfig.getTradeRiskAmount().stripTrailingZeros().toPlainString(), bean.getTradeRiskAmount().stripTrailingZeros().toPlainString(), "验证数据库mch_confog 中字段TradeRiskAmount与传入的TradeRiskAmount是否一致");

		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	
	
	@Test
	@Category({P1.class})
	@TestCase
	public void Tc_setShareType_040() {
		Logger.start(true, "验证商品风控值-TradeRiskAmount=0-成功");
		try {
	
			bean= initSetShareType();
			bean.setTradeRiskAmount(new BigDecimal("0"));
			bean.setPayMode(1);//支付方式:微信支付通道1：飞界国际2：飞界国际电子商务3：盛付通
			call.setData(bean);
			call.callService();
			
			//双店模式
	        mch_configExample example=new mch_configExample();
	        example.createCriteria().andMchIdEqualTo(bean.getMchId());
	        mch_config mchconfig=mchconfigWapper.selectByExample(example).get(0);

			Logger.verifyEquals("200", call.getStatus1(), "验证返回成功status值");
	        Logger.verifyEquals("请求成功", call.getMessage(), "验证返回成功Message值");
	        Logger.verifyEquals(mchconfig.getProductRiskAmount().stripTrailingZeros().toPlainString(), bean.getProductRiskAmount().stripTrailingZeros().toPlainString(), "验证数据库mch_confog 中字段ProductRiskAmount与传入的ProductRiskAmount是否一致");
	        Logger.verifyEquals("0", bean.getTradeRiskAmount().stripTrailingZeros().toPlainString(), "验证数据库mch_confog 中字段TradeRiskAmount与传入的TradeRiskAmount是否一致");

		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	
	
	@Test
	@Category({P1.class})
	@TestCase
	public void Tc_setShareType_041() {
		Logger.start(true, "验证商品风控值-ProductRiskAmount>TradeRiskAmount-成功");
		try {
	
			bean= initSetShareType();
			bean.setProductRiskAmount(new BigDecimal("2"));
			bean.setTradeRiskAmount(new BigDecimal("1"));
			bean.setPayMode(1);//支付方式:微信支付通道1：飞界国际2：飞界国际电子商务3：盛付通
			call.setData(bean);
			call.callService();
			
			//双店模式
	        mch_configExample example=new mch_configExample();
	        example.createCriteria().andMchIdEqualTo(bean.getMchId());
	        mch_config mchconfig=mchconfigWapper.selectByExample(example).get(0);

			Logger.verifyEquals("200", call.getStatus1(), "验证返回成功status值");
	        Logger.verifyEquals("请求成功", call.getMessage(), "验证返回成功Message值");
	        Logger.verifyEquals(mchconfig.getProductRiskAmount().stripTrailingZeros().toPlainString(), bean.getProductRiskAmount().stripTrailingZeros().toPlainString(), "验证数据库mch_confog 中字段ProductRiskAmount与传入的ProductRiskAmount是否一致");
	        Logger.verifyEquals(mchconfig.getTradeRiskAmount().stripTrailingZeros().toPlainString(), bean.getTradeRiskAmount().stripTrailingZeros().toPlainString(), "验证数据库mch_confog 中字段TradeRiskAmount与传入的TradeRiskAmount是否一致");

		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	
	
	@Test
	@Category({P1.class})
	@TestCase
	public void Tc_setShareType_042() {
		Logger.start(true, "验证商品风控值-负数-ProductRiskAmount=-1失败");
		try {
	
			bean= initSetShareType();
			bean.setProductRiskAmount(new BigDecimal("-1"));
			bean.setPayMode(1);//支付方式:微信支付通道1：飞界国际2：飞界国际电子商务3：盛付通
			call.setData(bean);
			call.callService();
			
			Logger.verifyEquals("4001", call.getStatus1(), "验证返回成功status值");
	        Logger.verifyEquals(true, call.getMessage().contains("productRiskAmount 非法"), "验证返回成功Message值");

		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	
	
	@Test
	@Category({P1.class})
	@TestCase
	public void Tc_setShareType_043() {
		Logger.start(true, "验证商品风控值-负数-TradeRiskAmount=-1失败");
		try {
	
			bean= initSetShareType();
			bean.setTradeRiskAmount(new BigDecimal("-1"));
			bean.setPayMode(1);//支付方式:微信支付通道1：飞界国际2：飞界国际电子商务3：盛付通
			call.setData(bean);
			call.callService();
			
			Logger.verifyEquals("4001", call.getStatus1(), "验证返回成功status值");
	        Logger.verifyEquals(true, call.getMessage().contains("tradeRiskAmount 非法"), "验证返回成功Message值");

		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	
	@Test
	@Category({P1.class})
	@TestCase
	public void Tc_setShareType_044() {
		Logger.start(true, "验证商品风控值-超过最大临界值-ProductRiskAmount=9999999999999999999999999999999失败");
		try {
			
			//设置之前
	        mch_configExample example=new mch_configExample();
	        example.createCriteria().andMchIdEqualTo(bean.getMchId());
	        mch_config mchconfig=mchconfigWapper.selectByExample(example).get(0);
	
			bean= initSetShareType();
			bean.setTradeRiskAmount(new BigDecimal("9999999999999999999999999999999"));
			bean.setPayMode(1);//支付方式:微信支付通道1：飞界国际2：飞界国际电子商务3：盛付通
			call.setData(bean);
			call.callService();
			//mch_info 更新 mch_config不更新
			HashMap<String,Object> map=new HashMap();
			map.put("mchId", bean.getMchId());
		     mch_info act_info=mchinfoWapper.selectby(map).get(0);
		     
			Logger.verifyEquals("200", call.getStatus1(), "验证返回成功status值");
	        Logger.verifyEquals("请求成功", call.getMessage(), "验证返回成功Message值");
	        Logger.verifyEquals(act_info.getMchShareType(), bean.getMchShareType(), "验证数据库mch_info 中字段MchShareType与传入的是否一致");
	        Logger.verifyEquals(act_info.getState(), bean.getMchStatus(), "验证数据库mch_info 中字段State与传入的MchStatus是否一致");
	        Logger.verifyEquals(act_info.getRemark(), bean.getRemark(), "验证数据库mch_info 中字段Remark与传入的Remark是否一致");

	        //双店模式、风控

	        mch_config mchconfig2=mchconfigWapper.selectByExample(example).get(0);
	        Logger.verifyEquals(act_info.getDualMode(), bean.getDualMode(), "验证数据库mch_info 中字段DualMode与传入的DualMode是否一致");
	        //购买方式
	        Logger.verifyEquals(mchconfig.getMchSideBuy(), mchconfig2.getMchSideBuy(), "验证数据库mch_confog 中字段MchSideBuy与传入的MchSideBuy是否一致");
	        //支付类型
	        Logger.verifyEquals(bean.getPayMode(), act_info.getPayMode(), "验证数据库mch_info 中字段paymode与传入的paymode是否一致");
	        Logger.verifyEquals(mchconfig2.getProductRiskAmount(), mchconfig.getProductRiskAmount(), "验证商品风控超过最大临界值时,商品风控值修改失败，数据还是之前数据");
	        Logger.verifyEquals(mchconfig2.getTradeRiskAmount(), mchconfig.getTradeRiskAmount(), "验证商品风控超过最大临界值时，商品风控值修改失败,交易风控不变，数据还是之前数据");
	        
            Logger.comment("mchconfig.getMchSideBuy():"+mchconfig.getMchSideBuy());
            Logger.comment("mchconfig2.getMchSideBuy():"+mchconfig2.getMchSideBuy());
            
		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	
	@Test
	@Category({P1.class})
	@TestCase
	public void Tc_setShareType_045() {
		Logger.start(true, "验证商品风控值-超过最大临界值-TradeRiskAmount=9999999999999999999999999999999失败");
		try {
			
			//设置之前
	        mch_configExample example=new mch_configExample();
	        example.createCriteria().andMchIdEqualTo(bean.getMchId());
	        mch_config mchconfig=mchconfigWapper.selectByExample(example).get(0);
	
			bean= initSetShareType();
			bean.setTradeRiskAmount(new BigDecimal("9999999999999999999999999999999"));
			bean.setPayMode(1);//支付方式:微信支付通道1：飞界国际2：飞界国际电子商务3：盛付通
			call.setData(bean);
			call.callService();
			//mch_info 更新 mch_config不更新
			HashMap<String,Object> map=new HashMap();
			map.put("mchId", bean.getMchId());
		     mch_info act_info=mchinfoWapper.selectby(map).get(0);
		     
			Logger.verifyEquals("200", call.getStatus1(), "验证返回成功status值");
	        Logger.verifyEquals("请求成功", call.getMessage(), "验证返回成功Message值");
	        Logger.verifyEquals(act_info.getMchShareType(), bean.getMchShareType(), "验证数据库mch_info 中字段MchShareType与传入的是否一致");
	        Logger.verifyEquals(act_info.getState(), bean.getMchStatus(), "验证数据库mch_info 中字段State与传入的MchStatus是否一致");
	        Logger.verifyEquals(act_info.getRemark(), bean.getRemark(), "验证数据库mch_info 中字段Remark与传入的Remark是否一致");

	        //双店模式、风控
	        mch_config mchconfig2=mchconfigWapper.selectByExample(example).get(0);
	        Logger.verifyEquals(act_info.getDualMode(), bean.getDualMode(), "验证数据库mch_info 中字段DualMode与传入的DualMode是否一致");
	        //购买方式
	        Logger.verifyEquals(mchconfig.getMchSideBuy(), mchconfig2.getMchSideBuy(), "验证数据库mch_confog 中字段MchSideBuy与传入的MchSideBuy是否一致");
	        //支付类型
	        Logger.verifyEquals(bean.getPayMode(), act_info.getPayMode(), "验证数据库mch_info 中字段paymode与传入的paymode是否一致");

	        Logger.verifyEquals(mchconfig2.getTradeRiskAmount(), mchconfig.getTradeRiskAmount(), "验证交易风控超过最大临界值时,交易风控值修改失败，数据还是之前数据");
	        Logger.verifyEquals(mchconfig2.getProductRiskAmount(), mchconfig.getProductRiskAmount(), "验证交易风控超过最大临界值时，交易风控值修改失败,商品风控不变，数据还是之前数据");
	        
	        
		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	
    //独立商户切换
	@Test
	@Category({P1.class})
	@TestCase
	public void Tc_setShareType_046() {
		Logger.start(true, "独立商户由3:独立小程序切换成 4:独立H5-下级代理也切换成4:独立H5");
		try {
	
			//1：创建独立商户
			createIndepMchCall createIndepMchCall=new createIndepMchCall();
			createIndepMchBean createIndepMchBean=GodmchManageCallService.InitCreateIndepMchBean();
			createIndepMchBean.setMchShareType(3);
			createIndepMchCall.setData(createIndepMchBean);
			createIndepMchCall.callService();
			
			//2：申请代理
			applyAgentBean applyBean=GodmchManageCallService.InitApplyAgentBean();
			applyBean.setMchId(createIndepMchCall.getmchId());
			applyBean.setAppKey("appsqSeller_"+createIndepMchCall.getmchId());
			applyAgentCall applyCall=GodmchManageCallService.ApplyAgentCall(applyBean);
			//代理类型
			createagentBean agentBean=GodmchManageCallService.InitCreateAgentTypeBean(applyBean.getMchId());
			createagentCall agentCall=GodmchManageCallService.CreateAgentTypeCall(agentBean);
			//查询代理类型
			Map<String,Object> map=new HashMap();
			map.put("mchId", applyBean.getMchId());
			List<agent_type> list=GodmchManageCallService.agentTypeWapper.selectby(map);
			//3:审核代理
			approveAgentBean approveAgentBean=new approveAgentBean();
			approveAgentBean.setMchId(applyBean.getMchId());
			approveAgentBean.setAgentId(applyCall.getAgentId());
			approveAgentBean.setAgentType(list.get(0).getAgentType());
			approveAgentBean.setAgentMode(1);
		
			GodmchManageCallService.ApproveAgentCall(approveAgentBean);
			//切换
			bean= initSetShareType();
			bean.setMchId(createIndepMchCall.getmchId());
			//bean.setMchId(applyBean.getMchId());
			bean.setDualMode(0);//双店模式0：正常模式（默认）1：双店模式
			bean.setPayMode(5);//微信HipoPay支付通道:微信支付通道1：飞界国际2：飞界国际电子商务3：盛付通 4:飞界国际贸易 5：自有支付
			bean.setMchShareType(4);//分享方式1：小程序 2：H5 3：独立小程序  4：独立h5  5：继承版小程序
			call.setData(bean);
			call.callService();
			
			//验证
			List<Integer> channl_mchIds=new ArrayList<Integer>();
			channl_mchIds.add(createIndepMchCall.getmchId());
			mch_info  channl_info=mchinfoWapper.selectbyMchIds(channl_mchIds).get(0);
			
			List<Integer> agent_mchIds=new ArrayList<Integer>();
			agent_mchIds.add(createIndepMchCall.getmchId());
			mch_info  agent_info=mchinfoWapper.selectbyMchIds(agent_mchIds).get(0);
			Logger.verifyEquals(bean.getMchShareType(),channl_info.getMchShareType(), "验证独立商户是独立H5");
			Logger.verifyEquals(4,channl_info.getMchShareType(), "验证独立商户是独立H5");
			Logger.verifyEquals(4,agent_info.getMchShareType(), "验证独立商户是H5时 代理是H5");
			
 
		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	
	@Test
	@Category({P1.class})
	@TestCase
	@Ignore
	public void Tc_setShareType_046_1() {
		//Logger.start(true, "独立商户无下级 由3:独立小程序切换成 4:独立H5");
		//独立商户 只能是1或者2 20200406
		Logger.start(true, "独立商户无下级 由3:独立小程序切换成 4:独立H5(20200407修改分享类型是切到独立H5时，支付通道自动切到Hipopay-独立支付)");
		try {
	
			//1：创建独立商户
			createIndepMchCall createIndepMchCall=new createIndepMchCall();
			createIndepMchBean createIndepMchBean=GodmchManageCallService.InitCreateIndepMchBean();
			createIndepMchBean.setMchShareType(3);
			createIndepMchCall.setData(createIndepMchBean);
			createIndepMchCall.callService();
			
			//切换
			bean= initSetShareType();
			bean.setMchId(createIndepMchCall.getmchId());
			bean.setMchId(createIndepMchCall.getmchId());
			bean.setDualMode(0);//双店模式0：正常模式（默认）1：双店模式
			bean.setPayMode(1);//支付方式:微信支付通道0：不支持 1：飞界国际2：飞界国际电子商务3：盛付通4：飞界国际贸易5：自有支付
			bean.setMchShareType(4);//分享方式1：小程序 2：H5 3：独立小程序  4：独立h5  5：继承版小程序
			call.setData(bean);
			call.callService();
			
			
			//20200407修改分享类型是切到独立H5时，支付通道自动切到Hipopay-独立支付
			Logger.verifyEquals("5000", call.getStatus1(), "独立H5不能使用飞界国际");

 
		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	@Test
	@Category({P1.class})
	@TestCase
	public void Tc_setShareType_047() {
		Logger.start(true, "独立商户由4:独立H5 切换成 3:独立小程序-下级代理也切换成5:独立商户继承版");
		try {
	
			//1：创建独立商户
			createIndepMchCall createIndepMchCall=new createIndepMchCall();
			createIndepMchBean createIndepMchBean=GodmchManageCallService.InitCreateIndepMchBean();
			createIndepMchBean.setTitle("测试有下级ww2");
			createIndepMchBean.setMchShareType(4);
			createIndepMchCall.setData(createIndepMchBean);
			createIndepMchCall.callService();
			
			//2：申请代理
			applyAgentBean applyBean=GodmchManageCallService.InitApplyAgentBean();
			applyBean.setMchId(createIndepMchCall.getmchId());
			applyBean.setAppKey("appsqSeller_"+createIndepMchCall.getmchId());
			applyAgentCall applyCall=GodmchManageCallService.ApplyAgentCall(applyBean);
			//代理类型
			createagentBean agentBean=GodmchManageCallService.InitCreateAgentTypeBean(applyBean.getMchId());
			createagentCall agentCall=GodmchManageCallService.CreateAgentTypeCall(agentBean);
			//查询代理类型
			Map<String,Object> map=new HashMap();
			map.put("mchId", applyBean.getMchId());
			List<agent_type> list=GodmchManageCallService.agentTypeWapper.selectby(map);
			//3:审核代理
			approveAgentBean approveAgentBean=new approveAgentBean();
			approveAgentBean.setMchId(applyBean.getMchId());
			approveAgentBean.setAgentId(applyCall.getAgentId());
			approveAgentBean.setAgentType(list.get(0).getAgentType());
			approveAgentBean.setAgentMode(1);
		
			GodmchManageCallService.ApproveAgentCall(approveAgentBean);
			//切换
			bean= initSetShareType();
			bean.setMchId(createIndepMchCall.getmchId());
			bean.setDualMode(0);//双店模式0：正常模式（默认）1：双店模式
			bean.setPayMode(1);//支付方式:微信支付通道1：飞界国际2：飞界国际电子商务3：盛付通
			bean.setMchShareType(3);//分享方式1：小程序 2：H5 3：独立小程序  4：独立h5  5：继承版小程序
			call.setData(bean);
			call.callService();
			Thread.sleep(5000);//MQ更新下级信息，所以需要休眠
			Logger.comment("MchId():"+approveAgentBean.getMchId());
			Logger.comment("AgentId():"+approveAgentBean.getAgentId());
			//验证
			List<Integer> channl_mchIds=new ArrayList<Integer>();
			channl_mchIds.add(approveAgentBean.getMchId());
			mch_info  channl_info=mchinfoWapper.selectbyMchIds(channl_mchIds).get(0);
			
			List<Integer> agent_mchIds=new ArrayList<Integer>();
			agent_mchIds.add(approveAgentBean.getAgentId());
			mch_info  agent_info=mchinfoWapper.selectbyMchIds(agent_mchIds).get(0);
			
			Logger.verifyEquals(3,channl_info.getMchShareType(), "验证独立商户是独立小程序");
			Logger.verifyEquals(4,agent_info.getMchShareType(), "验证独立商户是独立小程序时,代理是小程序继承版");
			
 
		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	
	@Test
	@Category({P1.class})
	@TestCase
	public void Tc_setShareType_047_1() {
		Logger.start(true, "独立商户无下级 由4:独立H5 切换成 3:独立小程序");
		try {
	
			//1：创建独立商户
			createIndepMchCall createIndepMchCall=new createIndepMchCall();
			createIndepMchBean createIndepMchBean=GodmchManageCallService.InitCreateIndepMchBean();
			createIndepMchBean.setMchShareType(4);
			createIndepMchCall.setData(createIndepMchBean);
			createIndepMchCall.callService();
			
			//切换
			bean= initSetShareType();
			bean.setMchId(createIndepMchCall.getmchId());
			bean.setDualMode(0);//双店模式0：正常模式（默认）1：双店模式
			bean.setPayMode(1);//支付方式:微信支付通道1：飞界国际2：飞界国际电子商务3：盛付通
			bean.setMchShareType(3);//分享方式1：小程序 2：H5 3：独立小程序  4：独立h5  5：继承版小程序
			call.setData(bean);
			call.callService();
			
			//验证
			List<Integer> channl_mchIds=new ArrayList<Integer>();
			channl_mchIds.add(createIndepMchCall.getmchId());
			mch_info  channl_info=mchinfoWapper.selectbyMchIds(channl_mchIds).get(0);
			
			List<Integer> agent_mchIds=new ArrayList<Integer>();
			agent_mchIds.add(createIndepMchCall.getmchId());
			mch_info  agent_info=mchinfoWapper.selectbyMchIds(agent_mchIds).get(0);
			Logger.verifyEquals(bean.getMchShareType(),channl_info.getMchShareType(), "验证独立商户是独立H5");
			Logger.verifyEquals(3,channl_info.getMchShareType(), "验证独立商户是独立小程序");
			Logger.verifyEquals(3,agent_info.getMchShareType(), "验证独立商户是独立小程序时 代理是独立小程序");
			
 
		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	
	//支付通道切换优化 20200303
//	1、渠道商支付通道可选择：飞界国际、飞界国际电子商务，盛付通，无下级代理时都可切换，有下级代理时可以在飞界国际、飞界国际电子商务、飞界国际贸易之间切换，无法从飞界国际、飞界国际电子商务、飞界国际贸易切换到盛付通；
//	无法从盛付通切换到飞界国际、飞界国际电子商务、飞界国际贸易；渠道商切支付通道后，不用变更其下级代理的支付通道
//	2、代理的支付通道选择，代理可以在飞界国际、飞界国际电子商务、飞界国际贸易之间切换，无法从飞界国际、飞界国际电子商务、飞界国际贸易切换到盛付通；无法从盛付通切换到飞界国际、飞界国际电子商务、飞界国际贸易
//	3、服务商身份，可以在飞界国际、飞界国际电子商务、飞界国际贸易之间切换，无法从飞界国际、飞界国际电子商务、飞界国际贸易切换到盛付通；服务商无法使用盛付通
//	4、分享类型切换限制，公共版商家的分享类型去掉选项 “独立小程序继承版”，公共版商家不让使用这个选项
//总结：1：渠道、代理、服务商 商户 飞界国际、飞界国际电子商务、飞界国际贸易直接可以相互切换
//	  2：盛付通不可以切飞界国际、飞界国际电子商务、飞界国际贸易其中任意一种
//    3:服务商无法使用盛付通
	
	@Test
	@Category({P1.class})
	@TestCase
	public void Tc_setShareType_048() {
		Logger.start(true,"渠道-无级代理, 飞界国际 切 飞界国际电子商务 - 成功");
		try {
			//创建渠道
			Integer mchId_channl = GodmchManageCallService.CreateSellerMch();
			//设置初始化
			bean=GodmchManageCallService.initsetShareTypeV2(mchId_channl);
			bean.setPayMode(1);//支付方式:微信支付通道1：飞界国际2：飞界国际电子商务3：盛付通4:飞界国际贸易
			GodmchManageCallService.setShareTypeV2Call(bean);
			//重新切换通道
			bean.setPayMode(2);//支付方式:微信支付通道1：飞界国际2：飞界国际电子商务3：盛付通4:飞界国际贸易
			call=GodmchManageCallService.setShareTypeV2Call(bean);
            //校验
			check_pay(mchId_channl);

		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	
	@Test
	@Category({P1.class})
	@TestCase
	public void Tc_setShareType_049() {
		Logger.start(true,"渠道-无级代理,飞界国际电子商务 切  飞界国际-成功");
		try {
			//创建渠道
			Integer mchId_channl = GodmchManageCallService.CreateSellerMch();
			//设置初始化
			bean=GodmchManageCallService.initsetShareTypeV2(mchId_channl);
			bean.setPayMode(2);//支付方式:微信支付通道1：飞界国际2：飞界国际电子商务3：盛付通4:飞界国际贸易
			GodmchManageCallService.setShareTypeV2Call(bean);
			//重新切换通道
			bean.setPayMode(1);//支付方式:微信支付通道1：飞界国际2：飞界国际电子商务3：盛付通4:飞界国际贸易
			call=GodmchManageCallService.setShareTypeV2Call(bean);
            //校验
			check_pay(mchId_channl);

		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	
	
	@Test
	@Category({P1.class})
	@TestCase
	public void Tc_setShareType_050() {
		Logger.start(true,"渠道-无级代理,飞界国际电子商务 切 飞界国际贸易  -成功");
		try {
			//创建渠道
			Integer mchId_channl = GodmchManageCallService.CreateSellerMch();
			//设置初始化
			bean=GodmchManageCallService.initsetShareTypeV2(mchId_channl);
			bean.setPayMode(2);//支付方式:微信支付通道1：飞界国际2：飞界国际电子商务3：盛付通4:飞界国际贸易
			GodmchManageCallService.setShareTypeV2Call(bean);
			//重新切换通道
			bean.setPayMode(4);//支付方式:微信支付通道1：飞界国际2：飞界国际电子商务3：盛付通4:飞界国际贸易
			call=GodmchManageCallService.setShareTypeV2Call(bean);
            //校验
			check_pay(mchId_channl);

		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	
	
	@Test
	@Category({P1.class})
	@TestCase
	public void Tc_setShareType_051() {
		Logger.start(true,"渠道-无级代理, 飞界国际贸易切 飞界国际电子商务  -成功");
		try {
			//创建渠道
			Integer mchId_channl = GodmchManageCallService.CreateSellerMch();
			//设置初始化
			bean=GodmchManageCallService.initsetShareTypeV2(mchId_channl);
			bean.setPayMode(4);//支付方式:微信支付通道1：飞界国际2：飞界国际电子商务3：盛付通4:飞界国际贸易
			GodmchManageCallService.setShareTypeV2Call(bean);
			//重新切换通道
			bean.setPayMode(2);//支付方式:微信支付通道1：飞界国际2：飞界国际电子商务3：盛付通4:飞界国际贸易
			call=GodmchManageCallService.setShareTypeV2Call(bean);
            //校验
			check_pay(mchId_channl);

		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	
	@Test
	@Category({P1.class})
	@TestCase
	public void Tc_setShareType_052() {
		Logger.start(true,"渠道-无级代理,飞界国际贸易 切 飞界国际-成功");
		try {
			//创建渠道
			Integer mchId_channl = GodmchManageCallService.CreateSellerMch();
			//设置初始化
			bean=GodmchManageCallService.initsetShareTypeV2(mchId_channl);
			bean.setPayMode(4);//支付方式:微信支付通道1：飞界国际2：飞界国际电子商务3：盛付通4:飞界国际贸易
			GodmchManageCallService.setShareTypeV2Call(bean);
			//重新切换通道
			bean.setPayMode(1);//支付方式:微信支付通道1：飞界国际2：飞界国际电子商务3：盛付通4:飞界国际贸易
			call=GodmchManageCallService.setShareTypeV2Call(bean);
            //校验
			check_pay(mchId_channl);

		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	
	@Test
	@Category({P1.class})
	@TestCase
	public void Tc_setShareType_053() {
		Logger.start(true,"渠道-无级代理,飞界国际 切   飞界国际贸易-成功");
		try {
			//创建渠道
			Integer mchId_channl = GodmchManageCallService.CreateSellerMch();
			//设置初始化
			bean=GodmchManageCallService.initsetShareTypeV2(mchId_channl);
			bean.setPayMode(1);//支付方式:微信支付通道1：飞界国际2：飞界国际电子商务3：盛付通4:飞界国际贸易
			GodmchManageCallService.setShareTypeV2Call(bean);
			//重新切换通道
			bean.setPayMode(4);//支付方式:微信支付通道1：飞界国际2：飞界国际电子商务3：盛付通4:飞界国际贸易
			call=GodmchManageCallService.setShareTypeV2Call(bean);
            //校验
			check_pay(mchId_channl);

		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	
	
	@Test
	@Category({P1.class})
	@TestCase
	public void Tc_setShareType_054() {
		Logger.start(true,"渠道-无代理  盛付通 切 飞界国际-成功");
		try {
			//创建渠道
			Integer mchId_channl = GodmchManageCallService.CreateSellerMch();
			//设置初始化
			bean=GodmchManageCallService.initsetShareTypeV2(mchId_channl);
			bean.setPayMode(3);//支付方式:微信支付通道1：飞界国际2：飞界国际电子商务3：盛付通4:飞界国际贸易
			GodmchManageCallService.setShareTypeV2Call(bean);
			//重新切换通道
			bean.setPayMode(1);//支付方式:微信支付通道1：飞界国际2：飞界国际电子商务3：盛付通4:飞界国际贸易
			call=GodmchManageCallService.setShareTypeV2Call(bean);
            //校验
			check_pay(mchId_channl);

		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	
	@Test
	@Category({P1.class})
	@TestCase
	public void Tc_setShareType_055() {
		Logger.start(true,"渠道-无代理  盛付通 切 飞界国际-成功");
		try {
			//创建渠道
			Integer mchId_channl = GodmchManageCallService.CreateSellerMch();
			//设置初始化
			bean=GodmchManageCallService.initsetShareTypeV2(mchId_channl);
			bean.setPayMode(3);//支付方式:微信支付通道1：飞界国际2：飞界国际电子商务3：盛付通4:飞界国际贸易
			GodmchManageCallService.setShareTypeV2Call(bean);
			//重新切换通道
			bean.setPayMode(2);//支付方式:微信支付通道1：飞界国际2：飞界国际电子商务3：盛付通4:飞界国际贸易
			call=GodmchManageCallService.setShareTypeV2Call(bean);
            //校验
			check_pay(mchId_channl);

		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	
	
	@Test
	@Category({P1.class})
	@TestCase
	public void Tc_setShareType_056() {
		Logger.start(true,"渠道-无代理  盛付通 切 飞界国际贸易-成功");
		try {
			//创建渠道
			Integer mchId_channl = GodmchManageCallService.CreateSellerMch();
			//设置初始化
			bean=GodmchManageCallService.initsetShareTypeV2(mchId_channl);
			bean.setPayMode(3);//支付方式:微信支付通道1：飞界国际2：飞界国际电子商务3：盛付通4:飞界国际贸易
			GodmchManageCallService.setShareTypeV2Call(bean);
			//重新切换通道
			bean.setPayMode(4);//支付方式:微信支付通道1：飞界国际2：飞界国际电子商务3：盛付通4:飞界国际贸易
			call=GodmchManageCallService.setShareTypeV2Call(bean);
            //校验
			check_pay(mchId_channl);

		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	
	@Test
	@Category({P1.class})
	@TestCase
	public void Tc_setShareType_057() {
		Logger.start(true,"渠道-有下级代理,飞界国际 切 飞界国际电子商务 -下级支付通道不变- 成功");
		try {
			//创建渠道
			Integer mchId_channl = GodmchManageCallService.CreateSellerMch();
			//代理
			Integer mchId_Agent=GodmchManageCallService.createAgent(mchId_channl);
			
			//设置初始化
			bean=GodmchManageCallService.initsetShareTypeV2(mchId_channl);
			bean.setPayMode(1);//支付方式:微信支付通道1：飞界国际2：飞界国际电子商务3：盛付通4:飞界国际贸易
			GodmchManageCallService.setShareTypeV2Call(bean);
			//重新切换通道
			bean.setPayMode(2);//支付方式:微信支付通道1：飞界国际2：飞界国际电子商务3：盛付通4:飞界国际贸易
			call=GodmchManageCallService.setShareTypeV2Call(bean);
            //校验
			check_pay(mchId_channl,mchId_Agent);

		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	
	
	@Test
	@Category({P1.class})
	@TestCase
	public void Tc_setShareType_058() {
		Logger.start(true,"渠道-有下级代理,飞界国际电子商务 切  飞界国际-下级支付通道不变- 成功");
		try {
			//创建渠道
			Integer mchId_channl = GodmchManageCallService.CreateSellerMch();
			//代理
			Integer mchId_Agent=GodmchManageCallService.createAgent(mchId_channl);
			
			//设置初始化
			bean=GodmchManageCallService.initsetShareTypeV2(mchId_channl);
			bean.setPayMode(2);//支付方式:微信支付通道1：飞界国际2：飞界国际电子商务3：盛付通4:飞界国际贸易
			GodmchManageCallService.setShareTypeV2Call(bean);
			//重新切换通道
			bean.setPayMode(1);//支付方式:微信支付通道1：飞界国际2：飞界国际电子商务3：盛付通4:飞界国际贸易
			call=GodmchManageCallService.setShareTypeV2Call(bean);
            //校验
			check_pay(mchId_channl,mchId_Agent);

		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	
	@Test
	@Category({P1.class})
	@TestCase
	public void Tc_setShareType_059() {
		Logger.start(true,"渠道-有下级代理,飞界国际电子商务 切 飞界国际贸易 -下级支付通道不变 -成功");
		try {
			//创建渠道
			Integer mchId_channl = GodmchManageCallService.CreateSellerMch();
			//代理
			Integer mchId_Agent=GodmchManageCallService.createAgent(mchId_channl);
			
			//设置初始化
			bean=GodmchManageCallService.initsetShareTypeV2(mchId_channl);
			bean.setPayMode(2);//支付方式:微信支付通道1：飞界国际2：飞界国际电子商务3：盛付通4:飞界国际贸易
			GodmchManageCallService.setShareTypeV2Call(bean);
			//重新切换通道
			bean.setPayMode(4);//支付方式:微信支付通道1：飞界国际2：飞界国际电子商务3：盛付通4:飞界国际贸易
			call=GodmchManageCallService.setShareTypeV2Call(bean);
            //校验
			check_pay(mchId_channl,mchId_Agent);

		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	
	@Test
	@Category({P1.class})
	@TestCase
	public void Tc_setShareType_060() {
		Logger.start(true,"渠道-有下级代理, 飞界国际贸易切 飞界国际电子商务 -下级支付通道不变 -成功");
		try {
			//创建渠道
			Integer mchId_channl = GodmchManageCallService.CreateSellerMch();
			//代理
			Integer mchId_Agent=GodmchManageCallService.createAgent(mchId_channl);
			
			//设置初始化
			bean=GodmchManageCallService.initsetShareTypeV2(mchId_channl);
			bean.setPayMode(4);//支付方式:微信支付通道1：飞界国际2：飞界国际电子商务3：盛付通4:飞界国际贸易
			GodmchManageCallService.setShareTypeV2Call(bean);
			//重新切换通道
			bean.setPayMode(2);//支付方式:微信支付通道1：飞界国际2：飞界国际电子商务3：盛付通4:飞界国际贸易
			call=GodmchManageCallService.setShareTypeV2Call(bean);
            //校验
			check_pay(mchId_channl,mchId_Agent);

		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	@Test
	@Category({P1.class})
	@TestCase
	public void Tc_setShareType_061() {
		Logger.start(true,"渠道-有下级代理,飞界国际贸易 切 飞界国际  -下级支付通道不变-成功");
		try {
			//创建渠道
			Integer mchId_channl = GodmchManageCallService.CreateSellerMch();
			//代理
			Integer mchId_Agent=GodmchManageCallService.createAgent(mchId_channl);
			
			//设置初始化
			bean=GodmchManageCallService.initsetShareTypeV2(mchId_channl);
			bean.setPayMode(4);//支付方式:微信支付通道1：飞界国际2：飞界国际电子商务3：盛付通4:飞界国际贸易
			GodmchManageCallService.setShareTypeV2Call(bean);
			//重新切换通道
			bean.setPayMode(1);//支付方式:微信支付通道1：飞界国际2：飞界国际电子商务3：盛付通4:飞界国际贸易
			call=GodmchManageCallService.setShareTypeV2Call(bean);
            //校验
			check_pay(mchId_channl,mchId_Agent);

		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	
	@Test
	@Category({P1.class})
	@TestCase
	public void Tc_setShareType_062() {
		Logger.start(true,"渠道-有下级代理,飞界国际 切   飞界国际贸易-下级支付通道不变-成功");
		try {
			//创建渠道
			Integer mchId_channl = GodmchManageCallService.CreateSellerMch();
			//代理
			Integer mchId_Agent=GodmchManageCallService.createAgent(mchId_channl);
			
			//设置初始化
			bean=GodmchManageCallService.initsetShareTypeV2(mchId_channl);
			bean.setPayMode(1);//支付方式:微信支付通道1：飞界国际2：飞界国际电子商务3：盛付通4:飞界国际贸易
			GodmchManageCallService.setShareTypeV2Call(bean);
			//重新切换通道
			bean.setPayMode(4);//支付方式:微信支付通道1：飞界国际2：飞界国际电子商务3：盛付通4:飞界国际贸易
			call=GodmchManageCallService.setShareTypeV2Call(bean);
            //校验
			check_pay(mchId_channl,mchId_Agent);

		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	
	@Test
	@Category({P1.class})
	@TestCase
	@Ignore
	public void Tc_setShareType_063() {
		//盛付通现在没有了，单独一个domesticPayMode  表示盛付通  微信国内支付通道0：未开启1：盛付通 - 海鲲科技
		Logger.start(true,"渠道-有下级代理,飞界国际 切 盛付通 -失败(成功 20200407修改 所有类型都支持盛付通  )");
		
		try {
			//创建渠道
			Integer mchId_channl = GodmchManageCallService.CreateSellerMch();
			//代理
			Integer mchId_Agent=GodmchManageCallService.createAgent(mchId_channl);
			
			//设置初始化
			bean=GodmchManageCallService.initsetShareTypeV2(mchId_channl);
			bean.setPayMode(1);//支付方式:微信支付通道1：飞界国际2：飞界国际电子商务3：盛付通4:飞界国际贸易
			GodmchManageCallService.setShareTypeV2Call(bean);
			//重新切换通道
			bean.setPayMode(3);//支付方式:微信支付通道1：飞界国际2：飞界国际电子商务3：盛付通4:飞界国际贸易
			call=GodmchManageCallService.setShareTypeV2Call(bean);
            //校验 20200407修改 所有类型都支持盛付通
			Logger.verifyEquals("200", call.getStatus1(), "验证返回成功status值");
//			Logger.verifyEquals("5000", call.getStatus1(), "验证返回成功status值");
//	        Logger.verifyEquals(true, call.getMessage().contains("当前身份禁止切换通道币种"), "验证返回成功Message值");

		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	
	@Test
	@Category({P1.class})
	@TestCase
	@Ignore
	public void Tc_setShareType_064() {
		//盛付通现在没有了，单独一个domesticPayMode  表示盛付通  微信国内支付通道0：未开启1：盛付通 - 海鲲科技
		Logger.start(true,"渠道-有下级代理,飞界国际电子商务 切 盛付通 -失败(成功 20200407修改 所有类型都支持盛付通)");
		try {
			//创建渠道
			Integer mchId_channl = GodmchManageCallService.CreateSellerMch();
			//代理
			Integer mchId_Agent=GodmchManageCallService.createAgent(mchId_channl);
			
			//设置初始化
			bean=GodmchManageCallService.initsetShareTypeV2(mchId_channl);
			bean.setPayMode(2);//支付方式:微信支付通道1：飞界国际2：飞界国际电子商务3：盛付通4:飞界国际贸易
			GodmchManageCallService.setShareTypeV2Call(bean);
			//重新切换通道
			bean.setPayMode(3);//支付方式:微信支付通道1：飞界国际2：飞界国际电子商务3：盛付通4:飞界国际贸易
			call=GodmchManageCallService.setShareTypeV2Call(bean);
            //校验 20200407修改 所有类型都支持盛付通
			Logger.verifyEquals("200", call.getStatus1(), "验证返回成功status值");
		    
//			Logger.verifyEquals("5000", call.getStatus1(), "验证返回成功status值");
//	        Logger.verifyEquals(true, call.getMessage().contains("当前身份禁止切换通道币种"), "验证返回成功Message值");

		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	@Test
	@Category({P1.class})
	@TestCase
	@Ignore
	public void Tc_setShareType_065() {
		//盛付通现在没有了，单独一个domesticPayMode  表示盛付通  微信国内支付通道0：未开启1：盛付通 - 海鲲科技
		Logger.start(true,"渠道-有下级代理,飞界国际贸易 切 盛付通 -失败(成功 20200407修改 所有类型都支持盛付通)");
		try {
			//创建渠道
			Integer mchId_channl = GodmchManageCallService.CreateSellerMch();
			//代理
			Integer mchId_Agent=GodmchManageCallService.createAgent(mchId_channl);
			
			//设置初始化
			bean=GodmchManageCallService.initsetShareTypeV2(mchId_channl);
			bean.setPayMode(4);//支付方式:微信支付通道1：飞界国际2：飞界国际电子商务3：盛付通4:飞界国际贸易
			GodmchManageCallService.setShareTypeV2Call(bean);
			//重新切换通道
			bean.setPayMode(3);//支付方式:微信支付通道1：飞界国际2：飞界国际电子商务3：盛付通4:飞界国际贸易
			call=GodmchManageCallService.setShareTypeV2Call(bean);

            //校验 20200407修改 所有类型都支持盛付通
			Logger.verifyEquals("200", call.getStatus1(), "验证返回成功status值");

		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	
	@Test
	@Category({P1.class})
	@TestCase
	@Ignore
	public void Tc_setShareType_066() {
		Logger.start(true,"渠道-有代理  盛付通 切 飞界国际，失败");
		//20200407 盛付通单独一个字段domesticPayMode  微信国内支付通道
		try {
			//创建渠道
			Integer mchId_channl = GodmchManageCallService.CreateSellerMch();
			//代理
			Integer mchId_Agent=GodmchManageCallService.createAgent(mchId_channl);
			//修改为3盛付通
			HashMap<String,Object> map=new HashMap();
			map.put("mchId", mchId_channl);
		    mch_info info=mchinfoWapper.selectby(map).get(0);
		    info.setPayMode(3);
			mchinfoWapper.updateByPrimaryKey(info);
			
//			//设置初始化
			bean=GodmchManageCallService.initsetShareTypeV2(mchId_channl);
			
			//重新切换通道
			bean.setPayMode(1);//支付方式:微信支付通道1：飞界国际2：飞界国际电子商务3：盛付通4:飞界国际贸易
			call=GodmchManageCallService.setShareTypeV2Call(bean);
            //校验
			Logger.verifyEquals("5000", call.getStatus1(), "验证返回成功status值");
	        Logger.verifyEquals(true, call.getMessage().contains("当前身份禁止切换通道币种"), "验证返回成功Message值");

		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	
	
	@Test
	@Category({P1.class})
	@TestCase
	@Ignore
	public void Tc_setShareType_067() {
		Logger.start(true,"渠道-有代理  盛付通 切 飞界国际电子商务，失败");
		//20200407 盛付通单独一个字段domesticPayMode  微信国内支付通道
		try {
			//创建渠道
			Integer mchId_channl = GodmchManageCallService.CreateSellerMch();
			//代理
			Integer mchId_Agent=GodmchManageCallService.createAgent(mchId_channl);
			//修改为3盛付通
			HashMap<String,Object> map=new HashMap();
			map.put("mchId", mchId_channl);
		    mch_info info=mchinfoWapper.selectby(map).get(0);
		    info.setPayMode(3);
			mchinfoWapper.updateByPrimaryKey(info);
			
//			//设置初始化
			bean=GodmchManageCallService.initsetShareTypeV2(mchId_channl);
			//重新切换通道
			bean.setPayMode(2);//支付方式:微信支付通道1：飞界国际2：飞界国际电子商务3：盛付通4:飞界国际贸易
			call=GodmchManageCallService.setShareTypeV2Call(bean);
            //校验
			Logger.verifyEquals("5000", call.getStatus1(), "验证返回成功status值");
	        Logger.verifyEquals(true, call.getMessage().contains("当前身份禁止切换通道币种"), "验证返回成功Message值");

		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	@Test
	@Category({P1.class})
	@TestCase
	@Ignore
	public void Tc_setShareType_068() {
		Logger.start(true,"渠道-有代理  盛付通 切 飞界国际贸易，失败(20200407 盛付通单独一个字段domesticPayMode  微信国内支付通道)");
		try {
			//创建渠道
			Integer mchId_channl = GodmchManageCallService.CreateSellerMch();
			//代理
			Integer mchId_Agent=GodmchManageCallService.createAgent(mchId_channl);
			//修改为3盛付通
			HashMap<String,Object> map=new HashMap();
			map.put("mchId", mchId_channl);
		    mch_info info=mchinfoWapper.selectby(map).get(0);
		    info.setPayMode(3);
			mchinfoWapper.updateByPrimaryKey(info);
			
//			//设置初始化
			bean=GodmchManageCallService.initsetShareTypeV2(mchId_channl);
			//重新切换通道
			bean.setPayMode(4);//支付方式:微信支付通道1：飞界国际2：飞界国际电子商务3：盛付通4:飞界国际贸易
			call=GodmchManageCallService.setShareTypeV2Call(bean);
            //校验
			Logger.verifyEquals("5000", call.getStatus1(), "验证返回成功status值");
	        Logger.verifyEquals(true, call.getMessage().contains("当前身份禁止切换通道币种"), "验证返回成功Message值");

		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	
	//代理角色验证
	@Test
	@Category({P1.class})
	@TestCase
	public void Tc_setShareType_068_1() {
		Logger.start(true,"代理,飞界国际 切 飞界国际电子商务 - 成功");
		try {
			//创建渠道
			Integer mchId_channl = GodmchManageCallService.CreateSellerMch();
			//代理
			UserCreateBean usercreateBean1=DGUserCallService.initUsercreateBean();
			int userId_agent=DGUserCallService.UserCreateCall(usercreateBean1);
			
			List<createmchBean> createmchList=GodmchManageCallService.InitcreatemchBeanForAgent(mchId_channl, userId_agent);
			createmchList.get(0).setCountry("CHN");
			GodmchManageCallService.createmchCallForAgent(createmchList.toArray(new
					createmchBean[createmchList.size()]));
			editmchBean editmchbean2 = GodmchManageCallService.IniteditmachBean(userId_agent);
			GodmchManageCallService.editmachCall(editmchbean2);
			
			//设置初始化
			bean=GodmchManageCallService.initsetShareTypeV2(userId_agent);
			bean.setPayMode(1);//支付方式:微信支付通道1：飞界国际2：飞界国际电子商务3：盛付通4:飞界国际贸易
			GodmchManageCallService.setShareTypeV2Call(bean);
			//重新切换通道
			bean.setPayMode(2);//支付方式:微信支付通道1：飞界国际2：飞界国际电子商务3：盛付通4:飞界国际贸易
			call=GodmchManageCallService.setShareTypeV2Call(bean);
            //校验
			check_pay(userId_agent);

		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	@Test
	@Category({P1.class})
	@TestCase
	public void Tc_setShareType_068_2() {
		Logger.start(true,"代理,飞界国际电子商务 切  飞界国际-成功");
		try {
			//创建渠道
			Integer mchId_channl = GodmchManageCallService.CreateSellerMch();
			//代理
			UserCreateBean usercreateBean1=DGUserCallService.initUsercreateBean();
			int userId_agent=DGUserCallService.UserCreateCall(usercreateBean1);
			
			List<createmchBean> createmchList=GodmchManageCallService.InitcreatemchBeanForAgent(mchId_channl, userId_agent);
			createmchList.get(0).setCountry("CHN");
			GodmchManageCallService.createmchCallForAgent(createmchList.toArray(new
					createmchBean[createmchList.size()]));
			editmchBean editmchbean2 = GodmchManageCallService.IniteditmachBean(userId_agent);
			GodmchManageCallService.editmachCall(editmchbean2);
			
			//设置初始化
			bean=GodmchManageCallService.initsetShareTypeV2(userId_agent);
			bean.setPayMode(2);//支付方式:微信支付通道1：飞界国际2：飞界国际电子商务3：盛付通4:飞界国际贸易
			GodmchManageCallService.setShareTypeV2Call(bean);
			//重新切换通道
			bean.setPayMode(1);//支付方式:微信支付通道1：飞界国际2：飞界国际电子商务3：盛付通4:飞界国际贸易
			call=GodmchManageCallService.setShareTypeV2Call(bean);
            //校验
			check_pay(userId_agent);

		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	
	
	@Test
	@Category({P1.class})
	@TestCase
	public void Tc_setShareType_068_3() {
		Logger.start(true,"代理,飞界国际电子商务 切 飞界国际贸易-成功");
		try {
			//创建渠道
			Integer mchId_channl = GodmchManageCallService.CreateSellerMch();
			//代理
			UserCreateBean usercreateBean1=DGUserCallService.initUsercreateBean();
			int userId_agent=DGUserCallService.UserCreateCall(usercreateBean1);
			
			List<createmchBean> createmchList=GodmchManageCallService.InitcreatemchBeanForAgent(mchId_channl, userId_agent);
			createmchList.get(0).setCountry("CHN");
			GodmchManageCallService.createmchCallForAgent(createmchList.toArray(new
					createmchBean[createmchList.size()]));
			editmchBean editmchbean2 = GodmchManageCallService.IniteditmachBean(userId_agent);
			GodmchManageCallService.editmachCall(editmchbean2);
			
			//设置初始化
			bean=GodmchManageCallService.initsetShareTypeV2(userId_agent);
			bean.setPayMode(2);//支付方式:微信支付通道1：飞界国际2：飞界国际电子商务3：盛付通4:飞界国际贸易
			GodmchManageCallService.setShareTypeV2Call(bean);
			//重新切换通道
			bean.setPayMode(4);//支付方式:微信支付通道1：飞界国际2：飞界国际电子商务3：盛付通4:飞界国际贸易
			call=GodmchManageCallService.setShareTypeV2Call(bean);
            //校验
			check_pay(userId_agent);

		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	
	@Test
	@Category({P1.class})
	@TestCase
	public void Tc_setShareType_068_4() {
		Logger.start(true,"代理,飞界国际贸易切 飞界国际电子商务 -成功");
		try {
			//创建渠道
			Integer mchId_channl = GodmchManageCallService.CreateSellerMch();
			//代理
			UserCreateBean usercreateBean1=DGUserCallService.initUsercreateBean();
			int userId_agent=DGUserCallService.UserCreateCall(usercreateBean1);
			
			List<createmchBean> createmchList=GodmchManageCallService.InitcreatemchBeanForAgent(mchId_channl, userId_agent);
			createmchList.get(0).setCountry("CHN");
			GodmchManageCallService.createmchCallForAgent(createmchList.toArray(new
					createmchBean[createmchList.size()]));
			editmchBean editmchbean2 = GodmchManageCallService.IniteditmachBean(userId_agent);
			GodmchManageCallService.editmachCall(editmchbean2);
			
			//设置初始化
			bean=GodmchManageCallService.initsetShareTypeV2(userId_agent);
			bean.setPayMode(4);//支付方式:微信支付通道1：飞界国际2：飞界国际电子商务3：盛付通4:飞界国际贸易
			GodmchManageCallService.setShareTypeV2Call(bean);
			//重新切换通道
			bean.setPayMode(2);//支付方式:微信支付通道1：飞界国际2：飞界国际电子商务3：盛付通4:飞界国际贸易
			call=GodmchManageCallService.setShareTypeV2Call(bean);
            //校验
			check_pay(userId_agent);

		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	@Test
	@Category({P1.class})
	@TestCase
	public void Tc_setShareType_068_5() {
		Logger.start(true,"代理,飞界国际贸易 切 飞界国际  -成功");
		try {
			//创建渠道
			Integer mchId_channl = GodmchManageCallService.CreateSellerMch();
			//代理
			UserCreateBean usercreateBean1=DGUserCallService.initUsercreateBean();
			int userId_agent=DGUserCallService.UserCreateCall(usercreateBean1);
			
			List<createmchBean> createmchList=GodmchManageCallService.InitcreatemchBeanForAgent(mchId_channl, userId_agent);
			createmchList.get(0).setCountry("CHN");
			GodmchManageCallService.createmchCallForAgent(createmchList.toArray(new
					createmchBean[createmchList.size()]));
			editmchBean editmchbean2 = GodmchManageCallService.IniteditmachBean(userId_agent);
			GodmchManageCallService.editmachCall(editmchbean2);
			
			//设置初始化
			bean=GodmchManageCallService.initsetShareTypeV2(userId_agent);
			bean.setPayMode(4);//支付方式:微信支付通道1：飞界国际2：飞界国际电子商务3：盛付通4:飞界国际贸易
			GodmchManageCallService.setShareTypeV2Call(bean);
			//重新切换通道
			bean.setPayMode(1);//支付方式:微信支付通道1：飞界国际2：飞界国际电子商务3：盛付通4:飞界国际贸易
			call=GodmchManageCallService.setShareTypeV2Call(bean);
            //校验
			check_pay(userId_agent);

		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	
	@Test
	@Category({P1.class})
	@TestCase
	public void Tc_setShareType_068_6() {
		Logger.start(true,"代理,飞界国际 切   飞界国际贸易-成功");
		try {
			//创建渠道
			Integer mchId_channl = GodmchManageCallService.CreateSellerMch();
			//代理
			UserCreateBean usercreateBean1=DGUserCallService.initUsercreateBean();
			int userId_agent=DGUserCallService.UserCreateCall(usercreateBean1);
			
			List<createmchBean> createmchList=GodmchManageCallService.InitcreatemchBeanForAgent(mchId_channl, userId_agent);
			createmchList.get(0).setCountry("CHN");
			GodmchManageCallService.createmchCallForAgent(createmchList.toArray(new
					createmchBean[createmchList.size()]));
			editmchBean editmchbean2 = GodmchManageCallService.IniteditmachBean(userId_agent);
			GodmchManageCallService.editmachCall(editmchbean2);
			
			//设置初始化
			bean=GodmchManageCallService.initsetShareTypeV2(userId_agent);
			bean.setPayMode(1);//支付方式:微信支付通道1：飞界国际2：飞界国际电子商务3：盛付通4:飞界国际贸易
			GodmchManageCallService.setShareTypeV2Call(bean);
			//重新切换通道
			bean.setPayMode(4);//支付方式:微信支付通道1：飞界国际2：飞界国际电子商务3：盛付通4:飞界国际贸易
			call=GodmchManageCallService.setShareTypeV2Call(bean);
            //校验
			check_pay(userId_agent);

		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	
	@Test
	@Category({P1.class})
	@TestCase
	@Ignore
	public void Tc_setShareType_068_7() {
		Logger.start(true,"代理,飞界国际 切 盛付通  失败(20200407 盛付通单独一个字段domesticPayMode  微信国内支付通道)");
		try {
			//创建渠道
			Integer mchId_channl = GodmchManageCallService.CreateSellerMch();
			//代理
			UserCreateBean usercreateBean1=DGUserCallService.initUsercreateBean();
			int userId_agent=DGUserCallService.UserCreateCall(usercreateBean1);
			
			List<createmchBean> createmchList=GodmchManageCallService.InitcreatemchBeanForAgent(mchId_channl, userId_agent);
			createmchList.get(0).setCountry("CHN");
			GodmchManageCallService.createmchCallForAgent(createmchList.toArray(new
					createmchBean[createmchList.size()]));
			editmchBean editmchbean2 = GodmchManageCallService.IniteditmachBean(userId_agent);
			GodmchManageCallService.editmachCall(editmchbean2);
			
			//设置初始化
			bean=GodmchManageCallService.initsetShareTypeV2(userId_agent);
			bean.setPayMode(1);//支付方式:微信支付通道1：飞界国际2：飞界国际电子商务3：盛付通4:飞界国际贸易
			GodmchManageCallService.setShareTypeV2Call(bean);
			//重新切换通道
			bean.setPayMode(3);//支付方式:微信支付通道1：飞界国际2：飞界国际电子商务3：盛付通4:飞界国际贸易
			call=GodmchManageCallService.setShareTypeV2Call(bean);
            //校验
			Logger.verifyEquals("5000", call.getStatus1(), "验证返回成功status值");
	        Logger.verifyEquals(true, call.getMessage().contains("当前身份禁止切换通道币种"), "验证返回成功Message值");

		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	
	@Test
	@Category({P1.class})
	@TestCase
	@Ignore
	public void Tc_setShareType_068_8() {
		Logger.start(true,"代理,飞界国际电子商务 切 盛付通  失败(20200407 盛付通单独一个字段domesticPayMode  微信国内支付通道)");
		try {
			//创建渠道
			Integer mchId_channl = GodmchManageCallService.CreateSellerMch();
			//代理
			UserCreateBean usercreateBean1=DGUserCallService.initUsercreateBean();
			int userId_agent=DGUserCallService.UserCreateCall(usercreateBean1);
			
			List<createmchBean> createmchList=GodmchManageCallService.InitcreatemchBeanForAgent(mchId_channl, userId_agent);
			createmchList.get(0).setCountry("CHN");
			GodmchManageCallService.createmchCallForAgent(createmchList.toArray(new
					createmchBean[createmchList.size()]));
			editmchBean editmchbean2 = GodmchManageCallService.IniteditmachBean(userId_agent);
			GodmchManageCallService.editmachCall(editmchbean2);
			
			//设置初始化
			bean=GodmchManageCallService.initsetShareTypeV2(userId_agent);
			bean.setPayMode(2);//支付方式:微信支付通道1：飞界国际2：飞界国际电子商务3：盛付通4:飞界国际贸易
			GodmchManageCallService.setShareTypeV2Call(bean);
			//重新切换通道
			bean.setPayMode(3);//支付方式:微信支付通道1：飞界国际2：飞界国际电子商务3：盛付通4:飞界国际贸易
			call=GodmchManageCallService.setShareTypeV2Call(bean);
            //校验
			Logger.verifyEquals("5000", call.getStatus1(), "验证返回成功status值");
	        Logger.verifyEquals(true, call.getMessage().contains("当前身份禁止切换通道币种"), "验证返回成功Message值");

		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	
	@Test
	@Category({P1.class})
	@TestCase
	@Ignore
	public void Tc_setShareType_068_9() {
		Logger.start(true,"代理,飞界国际贸易 切 盛付通  失败(20200407 盛付通单独一个字段domesticPayMode  微信国内支付通道)");
		try {
			//创建渠道
			Integer mchId_channl = GodmchManageCallService.CreateSellerMch();
			//代理
			UserCreateBean usercreateBean1=DGUserCallService.initUsercreateBean();
			int userId_agent=DGUserCallService.UserCreateCall(usercreateBean1);
			
			List<createmchBean> createmchList=GodmchManageCallService.InitcreatemchBeanForAgent(mchId_channl, userId_agent);
			createmchList.get(0).setCountry("CHN");
			GodmchManageCallService.createmchCallForAgent(createmchList.toArray(new
					createmchBean[createmchList.size()]));
			editmchBean editmchbean2 = GodmchManageCallService.IniteditmachBean(userId_agent);
			GodmchManageCallService.editmachCall(editmchbean2);
			
			//设置初始化
			bean=GodmchManageCallService.initsetShareTypeV2(userId_agent);
			bean.setPayMode(4);//支付方式:微信支付通道1：飞界国际2：飞界国际电子商务3：盛付通4:飞界国际贸易
			GodmchManageCallService.setShareTypeV2Call(bean);
			//重新切换通道
			bean.setPayMode(3);//支付方式:微信支付通道1：飞界国际2：飞界国际电子商务3：盛付通4:飞界国际贸易
			call=GodmchManageCallService.setShareTypeV2Call(bean);
            //校验
			Logger.verifyEquals("5000", call.getStatus1(), "验证返回成功status值");
	        Logger.verifyEquals(true, call.getMessage().contains("当前身份禁止切换通道币种"), "验证返回成功Message值");

		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	
	
	@Test
	@Category({P1.class})
	@TestCase
	@Ignore
	public void Tc_setShareType_068_10() {
		Logger.start(true,"代理  盛付通 切 飞界国际，失败(20200407 盛付通单独一个字段domesticPayMode  微信国内支付通道)");
		try {
			//创建渠道
			Integer mchId_channl = GodmchManageCallService.CreateSellerMch();
			//代理
			UserCreateBean usercreateBean1=DGUserCallService.initUsercreateBean();
			int userId_agent=DGUserCallService.UserCreateCall(usercreateBean1);
			
			List<createmchBean> createmchList=GodmchManageCallService.InitcreatemchBeanForAgent(mchId_channl, userId_agent);
			createmchList.get(0).setCountry("CHN");
			GodmchManageCallService.createmchCallForAgent(createmchList.toArray(new
					createmchBean[createmchList.size()]));
			editmchBean editmchbean2 = GodmchManageCallService.IniteditmachBean(userId_agent);
			GodmchManageCallService.editmachCall(editmchbean2);
			
			//修改为3盛付通
			HashMap<String,Object> map=new HashMap();
			map.put("mchId", userId_agent);
		    mch_info info=mchinfoWapper.selectby(map).get(0);
		    info.setPayMode(3);
			mchinfoWapper.updateByPrimaryKey(info);

			//设置初始化
			bean=GodmchManageCallService.initsetShareTypeV2(userId_agent);
			//切换通道
			bean.setPayMode(1);//支付方式:微信支付通道1：飞界国际2：飞界国际电子商务3：盛付通4:飞界国际贸易
			call=GodmchManageCallService.setShareTypeV2Call(bean);
            //校验
			Logger.verifyEquals("5000", call.getStatus1(), "验证返回成功status值");
	        Logger.verifyEquals(true, call.getMessage().contains("当前身份禁止切换通道币种"), "验证返回成功Message值");

		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	@Test
	@Category({P1.class})
	@TestCase
	@Ignore
	public void Tc_setShareType_068_11() {
		Logger.start(true,"代理  盛付通 切 飞界国际，失败(20200407 盛付通单独一个字段domesticPayMode  微信国内支付通道)");
		try {
			//创建渠道
			Integer mchId_channl = GodmchManageCallService.CreateSellerMch();
			//代理
			UserCreateBean usercreateBean1=DGUserCallService.initUsercreateBean();
			int userId_agent=DGUserCallService.UserCreateCall(usercreateBean1);
			
			List<createmchBean> createmchList=GodmchManageCallService.InitcreatemchBeanForAgent(mchId_channl, userId_agent);
			createmchList.get(0).setCountry("CHN");
			GodmchManageCallService.createmchCallForAgent(createmchList.toArray(new
					createmchBean[createmchList.size()]));
			editmchBean editmchbean2 = GodmchManageCallService.IniteditmachBean(userId_agent);
			GodmchManageCallService.editmachCall(editmchbean2);
			
			//修改为3盛付通
			HashMap<String,Object> map=new HashMap();
			map.put("mchId", userId_agent);
		    mch_info info=mchinfoWapper.selectby(map).get(0);
		    info.setPayMode(3);
			mchinfoWapper.updateByPrimaryKey(info);

			//设置初始化
			bean=GodmchManageCallService.initsetShareTypeV2(userId_agent);
			//切换通道
			bean.setPayMode(1);//支付方式:微信支付通道1：飞界国际2：飞界国际电子商务3：盛付通4:飞界国际贸易
			call=GodmchManageCallService.setShareTypeV2Call(bean);
            //校验
			Logger.verifyEquals("5000", call.getStatus1(), "验证返回成功status值");
	        Logger.verifyEquals(true, call.getMessage().contains("当前身份禁止切换通道币种"), "验证返回成功Message值");

		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	
	@Test
	@Category({P1.class})
	@TestCase
	@Ignore
	public void Tc_setShareType_068_12() {
		Logger.start(true,"代理  盛付通 切 飞界国际电子商务，失败(20200407 盛付通单独一个字段domesticPayMode  微信国内支付通道)");
		try {
			//创建渠道
			Integer mchId_channl = GodmchManageCallService.CreateSellerMch();
			//代理
			UserCreateBean usercreateBean1=DGUserCallService.initUsercreateBean();
			int userId_agent=DGUserCallService.UserCreateCall(usercreateBean1);
			
			List<createmchBean> createmchList=GodmchManageCallService.InitcreatemchBeanForAgent(mchId_channl, userId_agent);
			createmchList.get(0).setCountry("CHN");
			GodmchManageCallService.createmchCallForAgent(createmchList.toArray(new
					createmchBean[createmchList.size()]));
			editmchBean editmchbean2 = GodmchManageCallService.IniteditmachBean(userId_agent);
			GodmchManageCallService.editmachCall(editmchbean2);
			
			//修改为3盛付通
			HashMap<String,Object> map=new HashMap();
			map.put("mchId", userId_agent);
		    mch_info info=mchinfoWapper.selectby(map).get(0);
		    info.setPayMode(3);
			mchinfoWapper.updateByPrimaryKey(info);

			//设置初始化
			bean=GodmchManageCallService.initsetShareTypeV2(userId_agent);
			//切换通道
			bean.setPayMode(2);//支付方式:微信支付通道1：飞界国际2：飞界国际电子商务3：盛付通4:飞界国际贸易
			call=GodmchManageCallService.setShareTypeV2Call(bean);
            //校验
			Logger.verifyEquals("5000", call.getStatus1(), "验证返回成功status值");
	        Logger.verifyEquals(true, call.getMessage().contains("当前身份禁止切换通道币种"), "验证返回成功Message值");

		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	
	@Test
	@Category({P1.class})
	@TestCase
	@Ignore
	public void Tc_setShareType_068_13() {
		Logger.start(true,"代理  盛付通 切 飞界国际贸易，失败(20200407 盛付通单独一个字段domesticPayMode  微信国内支付通道)");
		try {
			//创建渠道
			Integer mchId_channl = GodmchManageCallService.CreateSellerMch();
			//代理
			UserCreateBean usercreateBean1=DGUserCallService.initUsercreateBean();
			int userId_agent=DGUserCallService.UserCreateCall(usercreateBean1);
			
			List<createmchBean> createmchList=GodmchManageCallService.InitcreatemchBeanForAgent(mchId_channl, userId_agent);
			createmchList.get(0).setCountry("CHN");
			GodmchManageCallService.createmchCallForAgent(createmchList.toArray(new
					createmchBean[createmchList.size()]));
			editmchBean editmchbean2 = GodmchManageCallService.IniteditmachBean(userId_agent);
			GodmchManageCallService.editmachCall(editmchbean2);
			
			//修改为3盛付通
			HashMap<String,Object> map=new HashMap();
			map.put("mchId", userId_agent);
		    mch_info info=mchinfoWapper.selectby(map).get(0);
		    info.setPayMode(3);
			mchinfoWapper.updateByPrimaryKey(info);

			//设置初始化
			bean=GodmchManageCallService.initsetShareTypeV2(userId_agent);
			//切换通道
			bean.setPayMode(4);//支付方式:微信支付通道1：飞界国际2：飞界国际电子商务3：盛付通4:飞界国际贸易
			call=GodmchManageCallService.setShareTypeV2Call(bean);
            //校验
			Logger.verifyEquals("5000", call.getStatus1(), "验证返回成功status值");
	        Logger.verifyEquals(true, call.getMessage().contains("当前身份禁止切换通道币种"), "验证返回成功Message值");

		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	
	@Test
	@Category({P1.class})
	@TestCase
	public void Tc_setShareType_069() {
		Logger.start(true,"服务商-无级代理,飞界国际 切 飞界国际电子商务 - 成功");
		try {
			//创建服务商
			addProviderBean addProviderBean = GodmchManageCallService.InitAddProviderBean();
			addProviderCall addProviderCall=GodmchManageCallService.InitAddProviderCall(addProviderBean);
            Integer mchId_channl=addProviderBean.getProviderId();
            //设置初始化
			bean=GodmchManageCallService.initsetShareTypeV2(mchId_channl);
			bean.setPayMode(1);//支付方式:微信支付通道1：飞界国际2：飞界国际电子商务3：盛付通4:飞界国际贸易
			GodmchManageCallService.setShareTypeV2Call(bean);
			//重新切换通道
			bean.setPayMode(2);//支付方式:微信支付通道1：飞界国际2：飞界国际电子商务3：盛付通4:飞界国际贸易
			call=GodmchManageCallService.setShareTypeV2Call(bean);
            //校验
			check_pay(mchId_channl);
	        
		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	@Test
	@Category({P1.class})
	@TestCase
	public void Tc_setShareType_070() {
		Logger.start(true,"服务商-无级代理,飞界国际电子商务 切  飞界国际- 成功");
		try {
			//创建服务商
			addProviderBean addProviderBean = GodmchManageCallService.InitAddProviderBean();
			addProviderCall addProviderCall=GodmchManageCallService.InitAddProviderCall(addProviderBean);
            Integer mchId_channl=addProviderBean.getProviderId();
            //设置初始化
			bean=GodmchManageCallService.initsetShareTypeV2(mchId_channl);
			bean.setPayMode(2);//支付方式:微信支付通道1：飞界国际2：飞界国际电子商务3：盛付通4:飞界国际贸易
			bean.setDomesticPayMode(0);//微信国内支付通道 0：不支持 1：盛付通
			GodmchManageCallService.setShareTypeV2Call(bean);
			//重新切换通道
			bean.setPayMode(1);//支付方式:微信支付通道1：飞界国际2：飞界国际电子商务3：盛付通4:飞界国际贸易
			call=GodmchManageCallService.setShareTypeV2Call(bean);
            //校验
			check_pay(mchId_channl);
	        
		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	@Test
	@Category({P1.class})
	@TestCase
	public void Tc_setShareType_071() {
		Logger.start(true,"服务商-无级代理,飞界国际电子商务 切 飞界国际贸易  -成功");
		try {
			//创建服务商
			addProviderBean addProviderBean = GodmchManageCallService.InitAddProviderBean();
			addProviderCall addProviderCall=GodmchManageCallService.InitAddProviderCall(addProviderBean);
            Integer mchId_channl=addProviderBean.getProviderId();
            //设置初始化
			bean=GodmchManageCallService.initsetShareTypeV2(mchId_channl);
			bean.setPayMode(2);//支付方式:微信支付通道1：飞界国际2：飞界国际电子商务3：盛付通4:飞界国际贸易
			bean.setDomesticPayMode(0);//微信国内支付通道 0：不支持 1：盛付通
			GodmchManageCallService.setShareTypeV2Call(bean);
			//重新切换通道
			bean.setPayMode(4);//支付方式:微信支付通道1：飞界国际2：飞界国际电子商务3：盛付通4:飞界国际贸易
			call=GodmchManageCallService.setShareTypeV2Call(bean);
            //校验
			check_pay(mchId_channl);
	        
		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	@Test
	@Category({P1.class})
	@TestCase
	public void Tc_setShareType_072() {
		Logger.start(true,"服务商-无级代理, 飞界国际贸易切 飞界国际电子商务  -成功");
		try {
			//创建服务商
			addProviderBean addProviderBean = GodmchManageCallService.InitAddProviderBean();
			addProviderCall addProviderCall=GodmchManageCallService.InitAddProviderCall(addProviderBean);
            Integer mchId_channl=addProviderBean.getProviderId();
            //设置初始化
			bean=GodmchManageCallService.initsetShareTypeV2(mchId_channl);
			bean.setPayMode(4);//支付方式:微信支付通道1：飞界国际2：飞界国际电子商务3：盛付通4:飞界国际贸易
			bean.setDomesticPayMode(0);//微信国内支付通道 0：不支持 1：盛付通
			GodmchManageCallService.setShareTypeV2Call(bean);
			//重新切换通道
			bean.setPayMode(2);//支付方式:微信支付通道1：飞界国际2：飞界国际电子商务3：盛付通4:飞界国际贸易
			call=GodmchManageCallService.setShareTypeV2Call(bean);
            //校验
			check_pay(mchId_channl);
	        
		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	@Test
	@Category({P1.class})
	@TestCase
	public void Tc_setShareType_073() {
		Logger.start(true,"服务商-无级代理,飞界国际贸易 切 飞界国际-成功");
		try {
			//创建服务商
			addProviderBean addProviderBean = GodmchManageCallService.InitAddProviderBean();
			addProviderCall addProviderCall=GodmchManageCallService.InitAddProviderCall(addProviderBean);
            Integer mchId_channl=addProviderBean.getProviderId();
            //设置初始化
			bean=GodmchManageCallService.initsetShareTypeV2(mchId_channl);
			bean.setPayMode(4);//支付方式:微信支付通道1：飞界国际2：飞界国际电子商务3：盛付通4:飞界国际贸易
			bean.setDomesticPayMode(0);//微信国内支付通道 0：不支持 1：盛付通
			GodmchManageCallService.setShareTypeV2Call(bean);
			//重新切换通道
			bean.setPayMode(1);//支付方式:微信支付通道1：飞界国际2：飞界国际电子商务3：盛付通4:飞界国际贸易
			call=GodmchManageCallService.setShareTypeV2Call(bean);
            //校验
			check_pay(mchId_channl);
	        
		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	@Test
	@Category({P1.class})
	@TestCase
	public void Tc_setShareType_074() {
		Logger.start(true,"服务商-无级代理,飞界国际 切  飞界国际贸易-成功");
		try {
			//创建服务商
			addProviderBean addProviderBean = GodmchManageCallService.InitAddProviderBean();
			addProviderCall addProviderCall=GodmchManageCallService.InitAddProviderCall(addProviderBean);
            Integer mchId_channl=addProviderBean.getProviderId();
            //设置初始化
			bean=GodmchManageCallService.initsetShareTypeV2(mchId_channl);
			bean.setPayMode(1);//支付方式:微信支付通道1：飞界国际2：飞界国际电子商务3：盛付通4:飞界国际贸易
			bean.setDomesticPayMode(0);//微信国内支付通道 0：不支持 1：盛付通
			GodmchManageCallService.setShareTypeV2Call(bean);
			//重新切换通道
			bean.setPayMode(4);//支付方式:微信支付通道1：飞界国际2：飞界国际电子商务3：盛付通4:飞界国际贸易
			call=GodmchManageCallService.setShareTypeV2Call(bean);
            //校验
			check_pay(mchId_channl);
	        
		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	
	@Test
	@Category({P1.class})
	@TestCase
	@Ignore
	public void Tc_setShareType_075() {
		Logger.start(true,"服务商-无代理,飞界国际 切 盛付通  失败(20200407 盛付通单独一个字段domesticPayMode  微信国内支付通道)");
		try {
			//创建服务商
			addProviderBean addProviderBean = GodmchManageCallService.InitAddProviderBean();
			addProviderCall addProviderCall=GodmchManageCallService.InitAddProviderCall(addProviderBean);
            Integer mchId_channl=addProviderBean.getProviderId();
            //设置初始化
			bean=GodmchManageCallService.initsetShareTypeV2(mchId_channl);
			bean.setPayMode(1);//支付方式:微信支付通道1：飞界国际2：飞界国际电子商务3：盛付通4:飞界国际贸易
			GodmchManageCallService.setShareTypeV2Call(bean);
			//重新切换通道
			bean.setPayMode(3);//支付方式:微信支付通道1：飞界国际2：飞界国际电子商务3：盛付通4:飞界国际贸易
			call=GodmchManageCallService.setShareTypeV2Call(bean);
            //校验
			Logger.verifyEquals("5000", call.getStatus1(), "验证返回成功status值");
	        Logger.verifyEquals(true, call.getMessage().contains("服务商无法使用盛付通"), "验证返回成功Message值");
	        
		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	
	@Test
	@Category({P1.class})
	@TestCase
	@Ignore
	public void Tc_setShareType_076() {
		Logger.start(true,"服务商-无代理,飞界国际电子商务 切 盛付通  失败(20200407 盛付通单独一个字段domesticPayMode  微信国内支付通道)");
		try {
			//创建服务商
			addProviderBean addProviderBean = GodmchManageCallService.InitAddProviderBean();
			addProviderCall addProviderCall=GodmchManageCallService.InitAddProviderCall(addProviderBean);
            Integer mchId_channl=addProviderBean.getProviderId();
            //设置初始化
			bean=GodmchManageCallService.initsetShareTypeV2(mchId_channl);
			bean.setPayMode(2);//支付方式:微信支付通道1：飞界国际2：飞界国际电子商务3：盛付通4:飞界国际贸易
			GodmchManageCallService.setShareTypeV2Call(bean);
			//重新切换通道
			bean.setPayMode(3);//支付方式:微信支付通道1：飞界国际2：飞界国际电子商务3：盛付通4:飞界国际贸易
			call=GodmchManageCallService.setShareTypeV2Call(bean);
            //校验
			Logger.verifyEquals("5000", call.getStatus1(), "验证返回成功status值");
	        Logger.verifyEquals(true, call.getMessage().contains("服务商无法使用盛付通"), "验证返回成功Message值");
	        
		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	
	@Test
	@Category({P1.class})
	@TestCase
	@Ignore
	public void Tc_setShareType_077() {
		Logger.start(true,"服务商-无代理,飞界国际电子商务 切 盛付通  失败(20200407 盛付通单独一个字段domesticPayMode  微信国内支付通道)");
		try {
			//创建服务商
			addProviderBean addProviderBean = GodmchManageCallService.InitAddProviderBean();
			addProviderCall addProviderCall=GodmchManageCallService.InitAddProviderCall(addProviderBean);
            Integer mchId_channl=addProviderBean.getProviderId();
            //设置初始化
			bean=GodmchManageCallService.initsetShareTypeV2(mchId_channl);
			bean.setPayMode(4);//支付方式:微信支付通道1：飞界国际2：飞界国际电子商务3：盛付通4:飞界国际贸易
			GodmchManageCallService.setShareTypeV2Call(bean);
			//重新切换通道
			bean.setPayMode(3);//支付方式:微信支付通道1：飞界国际2：飞界国际电子商务3：盛付通4:飞界国际贸易
			call=GodmchManageCallService.setShareTypeV2Call(bean);
            //校验
			Logger.verifyEquals("5000", call.getStatus1(), "验证返回成功status值");
	        Logger.verifyEquals(true, call.getMessage().contains("服务商无法使用盛付通"), "验证返回成功Message值");
	        
		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	@Test
	@Category({P1.class})
	@TestCase
	@Ignore
	public void Tc_setShareType_078() {
		Logger.start(true,"服务商-无代理  盛付通 切 飞界国际，失败(20200407 盛付通单独一个字段domesticPayMode  微信国内支付通道)");
		try {
			//创建服务商
			addProviderBean addProviderBean = GodmchManageCallService.InitAddProviderBean();
			addProviderCall addProviderCall=GodmchManageCallService.InitAddProviderCall(addProviderBean);
            Integer mchId_channl=addProviderBean.getProviderId();
            //修改为3盛付通
			HashMap<String,Object> map=new HashMap();
			map.put("mchId", mchId_channl);
		    mch_info info=mchinfoWapper.selectby(map).get(0);
		    info.setPayMode(3);
			mchinfoWapper.updateByPrimaryKey(info);
			//重新切换通道
			bean=GodmchManageCallService.initsetShareTypeV2(mchId_channl);
			bean.setPayMode(1);//支付方式:微信支付通道1：飞界国际2：飞界国际电子商务3：盛付通4:飞界国际贸易
			call=GodmchManageCallService.setShareTypeV2Call(bean);
            //校验
			Logger.verifyEquals("5000", call.getStatus1(), "验证返回成功status值");
	        Logger.verifyEquals(true, call.getMessage().contains("当前身份禁止切换通道币种"), "验证返回成功Message值");
	        
		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	
	@Test
	@Category({P1.class})
	@TestCase
	@Ignore
	public void Tc_setShareType_079() {
		Logger.start(true,"服务商-无代理  盛付通 切 飞界国际电子商务，失败(20200407 盛付通单独一个字段domesticPayMode  微信国内支付通道)");
		try {
			//创建服务商
			addProviderBean addProviderBean = GodmchManageCallService.InitAddProviderBean();
			addProviderCall addProviderCall=GodmchManageCallService.InitAddProviderCall(addProviderBean);
            Integer mchId_channl=addProviderBean.getProviderId();
            //修改为3盛付通
			HashMap<String,Object> map=new HashMap();
			map.put("mchId", mchId_channl);
		    mch_info info=mchinfoWapper.selectby(map).get(0);
		    info.setPayMode(3);
			mchinfoWapper.updateByPrimaryKey(info);
			//重新切换通道
			bean=GodmchManageCallService.initsetShareTypeV2(mchId_channl);
			bean.setPayMode(2);//支付方式:微信支付通道1：飞界国际2：飞界国际电子商务3：盛付通4:飞界国际贸易
			call=GodmchManageCallService.setShareTypeV2Call(bean);
            //校验
			Logger.verifyEquals("5000", call.getStatus1(), "验证返回成功status值");
	        Logger.verifyEquals(true, call.getMessage().contains("当前身份禁止切换通道币种"), "验证返回成功Message值");
	        
		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	
	@Test
	@Category({P1.class})
	@TestCase
	@Ignore
	public void Tc_setShareType_080() {
		Logger.start(true,"服务商-无代理  盛付通 切 飞界国际贸易，失败(20200407 盛付通单独一个字段domesticPayMode  微信国内支付通道)");
		try {
			//创建服务商
			addProviderBean addProviderBean = GodmchManageCallService.InitAddProviderBean();
			addProviderCall addProviderCall=GodmchManageCallService.InitAddProviderCall(addProviderBean);
            Integer mchId_channl=addProviderBean.getProviderId();
            //修改为3盛付通
			HashMap<String,Object> map=new HashMap();
			map.put("mchId", mchId_channl);
		    mch_info info=mchinfoWapper.selectby(map).get(0);
		    info.setPayMode(3);
			mchinfoWapper.updateByPrimaryKey(info);
			//重新切换通道
			bean=GodmchManageCallService.initsetShareTypeV2(mchId_channl);
			bean.setPayMode(4);//支付方式:微信支付通道1：飞界国际2：飞界国际电子商务3：盛付通4:飞界国际贸易
			call=GodmchManageCallService.setShareTypeV2Call(bean);
            //校验
			Logger.verifyEquals("5000", call.getStatus1(), "验证返回成功status值");
	        Logger.verifyEquals(true, call.getMessage().contains("当前身份禁止切换通道币种"), "验证返回成功Message值");
	        
		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	
	
	@Test
	@Category({P1.class})
	@TestCase
	public void Tc_setShareType_081() {
		Logger.start(true,"服务商-有下级代理,飞界国际 切 飞界国际电子商务 -下级支付通道不变- 成功");
		try {
			//创建服务商
			addProviderBean addProviderBean = GodmchManageCallService.InitAddProviderBean();
			addProviderCall addProviderCall=GodmchManageCallService.InitAddProviderCall(addProviderBean);
            Integer mchId_channl=addProviderBean.getProviderId();
            //代理
			Integer mchId_Agent=GodmchManageCallService.createAgent(mchId_channl);
            //设置初始化
			bean=GodmchManageCallService.initsetShareTypeV2(mchId_channl);
			bean.setPayMode(1);//支付方式:微信支付通道1：飞界国际2：飞界国际电子商务3：盛付通4:飞界国际贸易
			GodmchManageCallService.setShareTypeV2Call(bean);
			//重新切换通道
			bean.setPayMode(2);//支付方式:微信支付通道1：飞界国际2：飞界国际电子商务3：盛付通4:飞界国际贸易
			call=GodmchManageCallService.setShareTypeV2Call(bean);
            //校验
			check_pay(mchId_channl,mchId_Agent);
	        
		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	
	@Test
	@Category({P1.class})
	@TestCase
	public void Tc_setShareType_082() {
		Logger.start(true,"服务商-有下级代理,飞界国际电子商务 切  飞界国际-下级支付通道不变- 成功");
		try {
			//创建服务商
			addProviderBean addProviderBean = GodmchManageCallService.InitAddProviderBean();
			addProviderCall addProviderCall=GodmchManageCallService.InitAddProviderCall(addProviderBean);
            Integer mchId_channl=addProviderBean.getProviderId();
            //代理
			Integer mchId_Agent=GodmchManageCallService.createAgent(mchId_channl);
            //设置初始化
			bean=GodmchManageCallService.initsetShareTypeV2(mchId_channl);
			bean.setPayMode(2);//支付方式:微信支付通道1：飞界国际2：飞界国际电子商务3：盛付通4:飞界国际贸易
			bean.setDomesticPayMode(0);//微信国内支付通道:0：不支持  1：盛付通
			GodmchManageCallService.setShareTypeV2Call(bean);
			//重新切换通道
			bean.setPayMode(1);//支付方式:微信支付通道1：飞界国际2：飞界国际电子商务3：盛付通4:飞界国际贸易
			call=GodmchManageCallService.setShareTypeV2Call(bean);
            //校验
			check_pay(mchId_channl,mchId_Agent);
	        
		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	@Test
	@Category({P1.class})
	@TestCase
	public void Tc_setShareType_083() {
		Logger.start(true,"服务商-有下级代理,飞界国际电子商务 切 飞界国际贸易 -下级支付通道不变 -成功");
		try {
			//创建服务商
			addProviderBean addProviderBean = GodmchManageCallService.InitAddProviderBean();
			addProviderCall addProviderCall=GodmchManageCallService.InitAddProviderCall(addProviderBean);
            Integer mchId_channl=addProviderBean.getProviderId();
            //代理
			Integer mchId_Agent=GodmchManageCallService.createAgent(mchId_channl);
            //设置初始化
			bean=GodmchManageCallService.initsetShareTypeV2(mchId_channl);
			bean.setPayMode(2);//支付方式:微信支付通道1：飞界国际2：飞界国际电子商务3：盛付通4:飞界国际贸易
			bean.setDomesticPayMode(0);//微信国内支付通道:0：不支持  1：盛付通
			GodmchManageCallService.setShareTypeV2Call(bean);
			//重新切换通道
			bean.setPayMode(4);//支付方式:微信支付通道1：飞界国际2：飞界国际电子商务3：盛付通4:飞界国际贸易
			call=GodmchManageCallService.setShareTypeV2Call(bean);
            //校验
			check_pay(mchId_channl,mchId_Agent);
	        
		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	@Test
	@Category({P1.class})
	@TestCase
	public void Tc_setShareType_084() {
		Logger.start(true,"服务商-有下级代理,飞界国际贸易切 飞界国际电子商务 -下级支付通道不变 -成功");
		try {
			//创建服务商
			addProviderBean addProviderBean = GodmchManageCallService.InitAddProviderBean();
			addProviderCall addProviderCall=GodmchManageCallService.InitAddProviderCall(addProviderBean);
            Integer mchId_channl=addProviderBean.getProviderId();
            //代理
			Integer mchId_Agent=GodmchManageCallService.createAgent(mchId_channl);
            //设置初始化
			bean=GodmchManageCallService.initsetShareTypeV2(mchId_channl);
			bean.setPayMode(4);//支付方式:微信支付通道1：飞界国际2：飞界国际电子商务3：盛付通4:飞界国际贸易
			bean.setDomesticPayMode(0);//微信国内支付通道:0：不支持  1：盛付通
			GodmchManageCallService.setShareTypeV2Call(bean);
			//重新切换通道
			bean.setPayMode(2);//支付方式:微信支付通道1：飞界国际2：飞界国际电子商务3：盛付通4:飞界国际贸易
			call=GodmchManageCallService.setShareTypeV2Call(bean);
            //校验
			check_pay(mchId_channl,mchId_Agent);
	        
		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	@Test
	@Category({P1.class})
	@TestCase
	public void Tc_setShareType_085() {
		Logger.start(true,"服务商-有下级代理,飞界国际贸易 切 飞界国际  -下级支付通道不变-成功");
		try {
			//创建服务商
			addProviderBean addProviderBean = GodmchManageCallService.InitAddProviderBean();
			addProviderCall addProviderCall=GodmchManageCallService.InitAddProviderCall(addProviderBean);
            Integer mchId_channl=addProviderBean.getProviderId();
            //代理
			Integer mchId_Agent=GodmchManageCallService.createAgent(mchId_channl);
            //设置初始化
			bean=GodmchManageCallService.initsetShareTypeV2(mchId_channl);
			bean.setPayMode(4);//支付方式:微信支付通道1：飞界国际2：飞界国际电子商务3：盛付通4:飞界国际贸易
			bean.setDomesticPayMode(0);//微信国内支付通道:0：不支持  1：盛付通
			GodmchManageCallService.setShareTypeV2Call(bean);
			//重新切换通道
			bean.setPayMode(1);//支付方式:微信支付通道1：飞界国际2：飞界国际电子商务3：盛付通4:飞界国际贸易
			call=GodmchManageCallService.setShareTypeV2Call(bean);
            //校验
			check_pay(mchId_channl,mchId_Agent);
	        
		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	@Test
	@Category({P1.class})
	@TestCase
	public void Tc_setShareType_086() {
		Logger.start(true,"服务商-有下级代理,飞界国际 切   飞界国际贸易-下级支付通道不变-成功");
		try {
			//创建服务商
			addProviderBean addProviderBean = GodmchManageCallService.InitAddProviderBean();
			addProviderCall addProviderCall=GodmchManageCallService.InitAddProviderCall(addProviderBean);
            Integer mchId_channl=addProviderBean.getProviderId();
            //代理
			Integer mchId_Agent=GodmchManageCallService.createAgent(mchId_channl);
            //设置初始化
			bean=GodmchManageCallService.initsetShareTypeV2(mchId_channl);
			bean.setPayMode(1);//支付方式:微信支付通道1：飞界国际2：飞界国际电子商务3：盛付通4:飞界国际贸易
			bean.setDomesticPayMode(0);//微信国内支付通道:0：不支持  1：盛付通
			GodmchManageCallService.setShareTypeV2Call(bean);
			//重新切换通道
			bean.setPayMode(4);//支付方式:微信支付通道1：飞界国际2：飞界国际电子商务3：盛付通4:飞界国际贸易
			call=GodmchManageCallService.setShareTypeV2Call(bean);
            //校验
			check_pay(mchId_channl,mchId_Agent);
	        
		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	@Test
	@Category({P1.class})
	@TestCase
	@Ignore
	public void Tc_setShareType_087() {
		Logger.start(true,"服务商-有下级代理,飞界国际 切 盛付通 -失败(20200407 盛付通单独一个字段domesticPayMode  微信国内支付通道)");
		try {
			//创建服务商
			addProviderBean addProviderBean = GodmchManageCallService.InitAddProviderBean();
			addProviderCall addProviderCall=GodmchManageCallService.InitAddProviderCall(addProviderBean);
            Integer mchId_channl=addProviderBean.getProviderId();
            //代理
			Integer mchId_Agent=GodmchManageCallService.createAgent(mchId_channl);
            //设置初始化
			bean=GodmchManageCallService.initsetShareTypeV2(mchId_channl);
			bean.setPayMode(1);//支付方式:微信支付通道1：飞界国际2：飞界国际电子商务3：盛付通4:飞界国际贸易
			GodmchManageCallService.setShareTypeV2Call(bean);
			//重新切换通道
			bean.setPayMode(3);//支付方式:微信支付通道1：飞界国际2：飞界国际电子商务3：盛付通4:飞界国际贸易
			call=GodmchManageCallService.setShareTypeV2Call(bean);
            //校验
			Logger.verifyEquals("5000", call.getStatus1(), "验证返回成功status值");
	        Logger.verifyEquals(true, call.getMessage().contains("服务商无法使用盛付通"), "验证返回成功Message值");
	        
		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	
	@Test
	@Category({P1.class})
	@TestCase
	@Ignore
	public void Tc_setShareType_088() {
		Logger.start(true,"服务商-有下级代理,飞界国际电子商务 切 盛付通-失败(20200407 盛付通单独一个字段domesticPayMode  微信国内支付通道)");
		try {
			//创建服务商
			addProviderBean addProviderBean = GodmchManageCallService.InitAddProviderBean();
			addProviderCall addProviderCall=GodmchManageCallService.InitAddProviderCall(addProviderBean);
            Integer mchId_channl=addProviderBean.getProviderId();
            //代理
			Integer mchId_Agent=GodmchManageCallService.createAgent(mchId_channl);
            //设置初始化
			bean=GodmchManageCallService.initsetShareTypeV2(mchId_channl);
			bean.setPayMode(2);//支付方式:微信支付通道1：飞界国际2：飞界国际电子商务3：盛付通4:飞界国际贸易
			GodmchManageCallService.setShareTypeV2Call(bean);
			//重新切换通道
			bean.setPayMode(3);//支付方式:微信支付通道1：飞界国际2：飞界国际电子商务3：盛付通4:飞界国际贸易
			call=GodmchManageCallService.setShareTypeV2Call(bean);
            //校验
			Logger.verifyEquals("5000", call.getStatus1(), "验证返回成功status值");
	        Logger.verifyEquals(true, call.getMessage().contains("服务商无法使用盛付通"), "验证返回成功Message值");
	        
		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	
	@Test
	@Category({P1.class})
	@TestCase
	@Ignore
	public void Tc_setShareType_089() {
		Logger.start(true,"服务商-有下级代理,飞界国际贸易 切 盛付通 -失败(20200407 盛付通单独一个字段domesticPayMode  微信国内支付通道)");
		try {
			//创建服务商
			addProviderBean addProviderBean = GodmchManageCallService.InitAddProviderBean();
			addProviderCall addProviderCall=GodmchManageCallService.InitAddProviderCall(addProviderBean);
            Integer mchId_channl=addProviderBean.getProviderId();
            //代理
			Integer mchId_Agent=GodmchManageCallService.createAgent(mchId_channl);
            //设置初始化
			bean=GodmchManageCallService.initsetShareTypeV2(mchId_channl);
			bean.setPayMode(4);//支付方式:微信支付通道1：飞界国际2：飞界国际电子商务3：盛付通4:飞界国际贸易
			GodmchManageCallService.setShareTypeV2Call(bean);
			//重新切换通道
			bean.setPayMode(3);//支付方式:微信支付通道1：飞界国际2：飞界国际电子商务3：盛付通4:飞界国际贸易
			call=GodmchManageCallService.setShareTypeV2Call(bean);
            //校验
			Logger.verifyEquals("5000", call.getStatus1(), "验证返回成功status值");
	        Logger.verifyEquals(true, call.getMessage().contains("服务商无法使用盛付通"), "验证返回成功Message值");
	        
		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	
	@Test
	@Category({P1.class})
	@TestCase
	@Ignore
	public void Tc_setShareType_090() {
		Logger.start(true,"服务商-有代理  盛付通 切 飞界国际-失败(20200407 盛付通单独一个字段domesticPayMode  微信国内支付通道)");
		try {
			//创建服务商
			addProviderBean addProviderBean = GodmchManageCallService.InitAddProviderBean();
			addProviderCall addProviderCall=GodmchManageCallService.InitAddProviderCall(addProviderBean);
            Integer mchId_channl=addProviderBean.getProviderId();
            //代理
			Integer mchId_Agent=GodmchManageCallService.createAgent(mchId_channl);
			//修改为3盛付通
			HashMap<String,Object> map=new HashMap();
			map.put("mchId", mchId_channl);
		    mch_info info=mchinfoWapper.selectby(map).get(0);
		    info.setPayMode(3);
			mchinfoWapper.updateByPrimaryKey(info);
			
			bean=GodmchManageCallService.initsetShareTypeV2(mchId_channl);
			//重新切换通道
			bean.setPayMode(1);//支付方式:微信支付通道1：飞界国际2：飞界国际电子商务3：盛付通4:飞界国际贸易
			call=GodmchManageCallService.setShareTypeV2Call(bean);
            //校验
			Logger.verifyEquals("5000", call.getStatus1(), "验证返回成功status值");
	        Logger.verifyEquals(true, call.getMessage().contains("当前身份禁止切换通道币种"), "验证返回成功Message值");
	        
		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	
	@Test
	@Category({P1.class})
	@TestCase
	@Ignore
	public void Tc_setShareType_091() {
		Logger.start(true,"服务商-有代理  盛付通 切 飞界国际电子商务-失败(20200407 盛付通单独一个字段domesticPayMode  微信国内支付通道)");
		try {
			//创建服务商
			addProviderBean addProviderBean = GodmchManageCallService.InitAddProviderBean();
			addProviderCall addProviderCall=GodmchManageCallService.InitAddProviderCall(addProviderBean);
            Integer mchId_channl=addProviderBean.getProviderId();
            //代理
			Integer mchId_Agent=GodmchManageCallService.createAgent(mchId_channl);
			//修改为3盛付通
			HashMap<String,Object> map=new HashMap();
			map.put("mchId", mchId_channl);
		    mch_info info=mchinfoWapper.selectby(map).get(0);
		    info.setPayMode(3);
			mchinfoWapper.updateByPrimaryKey(info);
			
			bean=GodmchManageCallService.initsetShareTypeV2(mchId_channl);
			//重新切换通道
			bean.setPayMode(2);//支付方式:微信支付通道1：飞界国际2：飞界国际电子商务3：盛付通4:飞界国际贸易
			call=GodmchManageCallService.setShareTypeV2Call(bean);
            //校验
			Logger.verifyEquals("5000", call.getStatus1(), "验证返回成功status值");
	        Logger.verifyEquals(true, call.getMessage().contains("当前身份禁止切换通道币种"), "验证返回成功Message值");
	        
		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	
	@Test
	@Category({P1.class})
	@TestCase
	@Ignore
	public void Tc_setShareType_092() {
		Logger.start(true,"服务商-有代理  盛付通 切 飞界国际贸易-失败(20200407 盛付通单独一个字段domesticPayMode  微信国内支付通道)");
		try {
			//创建服务商
			addProviderBean addProviderBean = GodmchManageCallService.InitAddProviderBean();
			addProviderCall addProviderCall=GodmchManageCallService.InitAddProviderCall(addProviderBean);
            Integer mchId_channl=addProviderBean.getProviderId();
            //代理
			Integer mchId_Agent=GodmchManageCallService.createAgent(mchId_channl);
			//修改为3盛付通
			HashMap<String,Object> map=new HashMap();
			map.put("mchId", mchId_channl);
		    mch_info info=mchinfoWapper.selectby(map).get(0);
		    info.setPayMode(3);
			mchinfoWapper.updateByPrimaryKey(info);
			
			bean=GodmchManageCallService.initsetShareTypeV2(mchId_channl);
			//重新切换通道
			bean.setPayMode(4);//支付方式:微信支付通道1：飞界国际2：飞界国际电子商务3：盛付通4:飞界国际贸易
			call=GodmchManageCallService.setShareTypeV2Call(bean);
            //校验
			Logger.verifyEquals("5000", call.getStatus1(), "验证返回成功status值");
	        Logger.verifyEquals(true, call.getMessage().contains("当前身份禁止切换通道币种"), "验证返回成功Message值");
	        
		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	
	
	
	@Test
	@Category({P1.class})
	@TestCase
	public void Tc_setShareType_093() {
		Logger.start(true,"渠道-双店模式修改-发MQ");
		try {
			//创建渠道
			Integer mchId_channl = GodmchManageCallService.CreateSellerMch();
			//设置初始化
			bean=GodmchManageCallService.initsetShareTypeV2(mchId_channl);
			bean.setDualMode(1);//双店模式0：正常模式（默认）1：双店模式
			call=GodmchManageCallService.setShareTypeV2Call(bean);
            //校验
			MessageListBean messageListBean=mqQueryCallService.initGodmchManage(String.valueOf(bean.getMchId()), "change_pay_mode");
	        List <Map> mq=mqQueryCallService.GetMqMessage(messageListBean);
	        if(mq.size()==0){
				Thread.sleep(5000);
				mq = MqQueryCallService.GetMqMessage(messageListBean);
			}
	        Logger.verifyEquals(mq.get(0).get("userId"),bean.getMchId(), "验证消息总线商户Id MchId");

		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	
	@Test
	@Category({P1.class})
	@TestCase
	public void Tc_setShareType_094() {
		Logger.start(true,"渠道-支付宝开启修改-发MQ");
		try {
			//创建渠道
			Integer mchId_channl = GodmchManageCallService.CreateSellerMch();
			//设置初始化
			bean=GodmchManageCallService.initsetShareTypeV2(mchId_channl);
			bean.setAliPayMode(1);//支付宝支付通道0：不支持支付宝 1：飞界国际
			call=GodmchManageCallService.setShareTypeV2Call(bean);
            //校验
			MessageListBean messageListBean=mqQueryCallService.initGodmchManage(String.valueOf(bean.getMchId()), "change_pay_mode");
	        List <Map> mq=mqQueryCallService.GetMqMessage(messageListBean);
	        if(mq.size()==0){
				Thread.sleep(5000);
				mq = MqQueryCallService.GetMqMessage(messageListBean);
			}
	        Logger.verifyEquals(mq.get(0).get("userId"),bean.getMchId(), "验证消息总线商户Id MchId");

		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	
	
	
	@Test
	@Category({P1.class})
	@TestCase
	public void Tc_setShareType_095() {
		Logger.start(true,"平台渠道-有下级代理,移除代理-设置盛付通-成功");
		try {
			//创建渠道
			Integer mchId_channl = GodmchManageCallService.CreateSellerMch();
			//代理
			UserCreateBean usercreateBean1=DGUserCallService.initUsercreateBean();
			int mchId_Agent=DGUserCallService.UserCreateCall(usercreateBean1);
			
			List<createmchBean> createmchList=GodmchManageCallService.InitcreatemchBeanForAgent(mchId_channl, mchId_Agent);
			//createmchList.get(0).setCountry("CHN");
			GodmchManageCallService.createmchCallForAgent(createmchList.toArray(new
					createmchBean[createmchList.size()]));
			editmchBean editmchbean2 = GodmchManageCallService.IniteditmachBean(mchId_Agent);
			GodmchManageCallService.editmachCall(editmchbean2);
			
			
            //设置初始化
			bean=GodmchManageCallService.initsetShareTypeV2(mchId_channl);
			bean.setPayMode(4);//支付方式:微信支付通道1：飞界国际2：飞界国际电子商务3：盛付通4:飞界国际贸易

			GodmchManageCallService.setShareTypeV2Call(bean);
			//移除代理
			GodmchManageCallService.InitremovemchForAgent(mchId_channl,mchId_Agent);
			
			//重新切换通道
			//bean.setPayMode(3);//支付方式:微信支付通道1：飞界国际2：飞界国际电子商务3：盛付通4:飞界国际贸易
			//盛付通 单独domesticPayMode字段
			bean.setDomesticPayMode(1);//微信国内支付通道:0：不支持  1：盛付通
			call=GodmchManageCallService.setShareTypeV2Call(bean);
            //校验
			check_pay(mchId_channl);
	        
		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	
	
	
	
	/************************* 20200407 修改支付方式********************************/
	
	@Test
	@Category({P1.class})
	@TestCase
	public void Tc_setShareType_096() {
		Logger.start(true,"渠道-分享类型是公共版小程序时，支付通道自动切到Hipopay-飞界国际，不可切换-成功");
		try {
			//创建渠道
			Integer mchId_channl = GodmchManageCallService.CreateSellerMch();
			
			//设置初始化
			bean=GodmchManageCallService.initsetShareTypeV2(mchId_channl);
			bean.setMchShareType(1);//分享方式1：小程序 2：H5 3：独立小程序  4：独立h5  5：继承版小程序
			bean.setPayMode(1);//支付方式:微信支付通道1：飞界国际2：飞界国际电子商务3：盛付通4:飞界国际贸易
			call=GodmchManageCallService.setShareTypeV2Call(bean);
            //校验
			check_pay(mchId_channl);

		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	
	@Test
	@Category({P1.class})
	@TestCase
	public void Tc_setShareType_096_1() {
		Logger.start(true,"渠道-分享类型是公共版小程序时，支付通道自动切到Hipopay-飞界国际电子商务、飞界国际贸易、自有支付、支付宝 ：飞界国际-失败（分享类型是公共版小程序时，支付通道自动切到Hipopay-飞界国际，不可切换）");
		try {
			//创建渠道
            Integer mchId_channl = GodmchManageCallService.CreateSellerMch();
			//设置初始化
			bean=GodmchManageCallService.initsetShareTypeV2(mchId_channl);
			bean.setMchShareType(1);//分享方式1：小程序 2：H5 3：独立小程序  4：独立h5  5：继承版小程序
			
			List<Integer> payModelId=new ArrayList<Integer>();
			payModelId.add(2);
			payModelId.add(4);
			payModelId.add(5);
			payModelId.add(6);
			for (Integer id : payModelId) {
				if(id==6)//，支付宝-飞界国际
					bean.setAliPayMode(1);//支付宝支付通道0：不支持支付宝 1：飞界国际
				else
					bean.setPayMode(id);//支付方式:微信支付通道1：飞界国际2：飞界国际电子商务3：盛付通4:飞界国际贸易5：自有支付
				
				call=GodmchManageCallService.setShareTypeV2Call(bean);
	            //校验
				Logger.verifyEquals("5000", call.getStatus1(), "验证PayMode="+id+"的状态status");
			}

		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	
	
	@Test
	@Category({P1.class})
	@TestCase
	public void Tc_setShareType_096_2() {
		Logger.start(true,"分享类型是公共版小程序时,渠道商关掉了微信支付Hipopay，新进来的代理也默认是关闭的");
		//分享类型是公共版小程序时，支付通道自动切到Hipopay-飞界国际，不可切换
		//该类型渠道商新进来的代理，分享类型为公共版小程序，支付通道Hipopay-飞界国际；盛付通开启；如果渠道商关掉了Hipopay或盛付通，代理也默认是关闭的
		try {
			//创建渠道
            Integer mchId_channl = GodmchManageCallService.CreateSellerMch();
			//设置初始化
			bean=GodmchManageCallService.initsetShareTypeV2(mchId_channl);
			bean.setMchShareType(1);//分享方式1：小程序 2：H5 3：独立小程序  4：独立h5  5：继承版小程序
			bean.setPayMode(0);//支付方式:微信支付通道1：飞界国际2：飞界国际电子商务3：盛付通4:飞界国际贸易 5：自有支付
			call=GodmchManageCallService.setShareTypeV2Call(bean);
			
			//代理
            Integer mchId_Agent=GodmchManageCallService.createAgent(mchId_channl);
            
			Logger.comment("mchId_channl:"+mchId_channl);
			Logger.comment("mchId_Agent:"+mchId_Agent);
            //校验
			HashMap<String,Object> map=new HashMap();
			map.put("mchId", mchId_channl);
		    mch_info channl_info=mchinfoWapper.selectby(map).get(0);
            Logger.verifyEquals(0, channl_info.getPayMode(), "验证渠道paymodel=0");
            
            map=new HashMap();
			map.put("mchId", mchId_Agent);
		    mch_info agent_info=mchinfoWapper.selectby(map).get(0);
            Logger.verifyEquals(0, agent_info.getPayMode(), "验证渠道paymodel=0");
            
		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	@Test
	@Category({P1.class})
	@TestCase
	@Ignore
	public void Tc_setShareType_097() {
		//MchShareType =5：继承版小程序  目前去掉，不存在
		Logger.start(true,"渠道-分享类型是独立H5时，分享类型是切到独立H5时，支付通道自动切到Hipopay-独立支付，不可切换-成功");
		try {
			//创建渠道
			Integer mchId_channl = GodmchManageCallService.CreateSellerMch();
			
			//设置初始化
			bean=GodmchManageCallService.initsetShareTypeV2(mchId_channl);
			bean.setMchShareType(5);//分享方式1：小程序 2：H5 3：独立小程序  4：独立h5  5：继承版小程序
			bean.setPayMode(5);//支付方式:微信支付通道1：飞界国际2：飞界国际电子商务3：盛付通4:飞界国际贸易 5：独立支付
			call=GodmchManageCallService.setShareTypeV2Call(bean);
            //校验
			check_pay(mchId_channl);

		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	
	@Test
	@Category({P1.class})
	@TestCase
	public void Tc_setShareType_097_1() {
		Logger.start(true,"渠道-分享类型是独立H5时，支付通道自动切到Hipopay-界国际电子商务、飞界国际、飞界国际电子商务、飞界国际贸易、自有支付、支付宝 ：飞界国际-失败（分享类型是切到独立H5时，支付通道自动切到Hipopay-独立支付，不可切换）");
		try {
			//创建渠道
            Integer mchId_channl = GodmchManageCallService.CreateSellerMch();
			//设置初始化
			bean=GodmchManageCallService.initsetShareTypeV2(mchId_channl);
			bean.setMchShareType(4);//分享方式1：小程序 2：H5 3：独立小程序  4：独立h5  5：继承版小程序
			
			List<Integer> payModelId=new ArrayList<Integer>();
			payModelId.add(1);
			payModelId.add(2);
			payModelId.add(4);
			payModelId.add(6);
			for (Integer id : payModelId) {
				Logger.comment("####  id ####### "+id);
				if(id==6)//，支付宝-飞界国际
					bean.setAliPayMode(1);//支付宝支付通道0：不支持支付宝 1：飞界国际
				else
					bean.setPayMode(id);//支付方式:微信支付通道1：飞界国际2：飞界国际电子商务3：盛付通4:飞界国际贸易5：自有支付
				
				call=GodmchManageCallService.setShareTypeV2Call(bean);
	            //校验
				Logger.verifyEquals("5000", call.getStatus1(), "验证PayMode="+id+"的状态status");
			}

		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	@Test
	@Category({P1.class})
	@TestCase
	public void Tc_setShareType_097_2() {
		Logger.start(true,"分享类型是切到独立H5时,渠道商关掉了微信支付Hipopay，新进来的代理也默认是关闭的");
		//分享类型是切到独立H5时，支付通道自动切到Hipopay-独立支付，不可切换
		//该类型渠道商新进来的代理，分享类型为独立H5，支付通道Hipopay-独立支付；如果渠道商关掉了Hipopay或盛付通，代理也默认是关闭的
		try {
			//创建渠道
            Integer mchId_channl = GodmchManageCallService.CreateSellerMch();
			//设置初始化
			bean=GodmchManageCallService.initsetShareTypeV2(mchId_channl);
			bean.setMchShareType(4);//分享方式1：小程序 2：H5 3：独立小程序  4：独立h5  5：继承版小程序
			bean.setPayMode(0);//支付方式:微信支付通道1：飞界国际2：飞界国际电子商务3：盛付通4:飞界国际贸易 5：自有支付
			call=GodmchManageCallService.setShareTypeV2Call(bean);
			
			//代理
            Integer mchId_Agent=GodmchManageCallService.createAgent(mchId_channl);
            
			Logger.comment("mchId_channl:"+mchId_channl);
			Logger.comment("mchId_Agent:"+mchId_Agent);
            //校验
			HashMap<String,Object> map=new HashMap();
			map.put("mchId", mchId_channl);
		    mch_info channl_info=mchinfoWapper.selectby(map).get(0);
            Logger.verifyEquals(0, channl_info.getPayMode(), "验证渠道paymodel=0");
            
            map=new HashMap();
			map.put("mchId", mchId_Agent);
		    mch_info agent_info=mchinfoWapper.selectby(map).get(0);
            Logger.verifyEquals(0, agent_info.getPayMode(), "验证渠道paymodel=0");
            
		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	
	
	/**
	 * 分享类型是公共H5时，支付通道可选Hipopay-飞界国际电子商务，飞界国际，飞界国际贸易，支付宝，盛付通，其他不可选
	 * 渠道商、代理商均可切换自己的支付通道，可在除独立支付的其他选项之间切换；
	 * 服务商身份的商家不允许从Hipopay切到盛付通，服务商无法使用盛付通
	 * 该类型渠道商新进来的代理，分享类型为公共H5，支付通道同渠道商配置的支付
	 * 如果渠道商关掉了Hipopay或盛付通，代理也默认是关闭的
	 */
	@Test
	@Category({P1.class})
	@TestCase
	public void Tc_setShareType_098() {
		Logger.start(true,"渠道-分享类型是公共H5时，支付通道可选Hipopay-飞界国际电子商务，飞界国际，飞界国际贸易，支付宝，盛付通，其他不可选-成功");
		try {
			//创建渠道
			Integer mchId_channl = GodmchManageCallService.CreateSellerMch();
			
			//设置初始化
			bean=GodmchManageCallService.initsetShareTypeV2(mchId_channl);
			bean.setMchShareType(2);//分享方式1：小程序 2：H5 3：独立小程序  4：独立h5  5：继承版小程序
			
			List<Integer> payModelId=new ArrayList<Integer>();
			payModelId.add(1);
			payModelId.add(2);
			payModelId.add(4);
			payModelId.add(6);//支付宝：1飞界国际
			payModelId.add(7);//微信国内支付：1：盛付通
			for (Integer id : payModelId) {
				Logger.comment("### id:  #### "+id);
				if(id==6)//，支付宝-飞界国际
					bean.setAliPayMode(1);//支付宝支付通道0：不支持支付宝 1：飞界国际
				else if(id==7)//微信国内支付：1：盛付通
					bean.setDomesticPayMode(1);
				else
					bean.setPayMode(id);//支付方式:微信支付通道1：飞界国际2：飞界国际电子商务3：盛付通4:飞界国际贸易5：自有支付
				
				call=GodmchManageCallService.setShareTypeV2Call(bean);
	            //校验
				check_pay(mchId_channl);
			}

		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	
	
	@Test
	@Category({P1.class})
	@TestCase
	public void Tc_setShareType_098_2() {
		Logger.start(true,"渠道-分享类型是公共H5时，支付通道Hipopay-独立支付-失败");
		try {
			//创建渠道
			Integer mchId_channl = GodmchManageCallService.CreateSellerMch();
			
			//设置初始化
			bean=GodmchManageCallService.initsetShareTypeV2(mchId_channl);
			bean.setMchShareType(2);//分享方式1：小程序 2：H5 3：独立小程序  4：独立h5  5：继承版小程序
			
			bean.setPayMode(5);//支付方式:微信支付通道1：飞界国际2：飞界国际电子商务3：盛付通4:飞界国际贸易5：自有支付
			call=GodmchManageCallService.setShareTypeV2Call(bean);
	        //校验
		    Logger.verifyEquals("5000", call.getStatus1(), "验证PayMode=自有支付的状态status");

		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	
	
	@Test
	@Category({P1.class})
	@TestCase
	public void Tc_setShareType_098_3() {
		Logger.start(true,"分享类型是切到公共H5时,渠道商新进来的代理也是 公共H5");
		//该类型渠道商新进来的代理，分享类型为公共H5，支付通道同渠道商配置的支付
		try {
			//创建渠道
            Integer mchId_channl = GodmchManageCallService.CreateSellerMch();
			//设置初始化
			bean=GodmchManageCallService.initsetShareTypeV2(mchId_channl);
			bean.setMchShareType(2);//分享方式1：小程序 2：H5 3：独立小程序  4：独立h5  5：继承版小程序
			bean.setPayMode(1);//支付方式:微信支付通道1：飞界国际2：飞界国际电子商务3：盛付通4:飞界国际贸易 5：自有支付
			call=GodmchManageCallService.setShareTypeV2Call(bean);
			
			//代理
            Integer mchId_Agent=GodmchManageCallService.createAgent(mchId_channl);
            
			Logger.comment("mchId_channl:"+mchId_channl);
			Logger.comment("mchId_Agent:"+mchId_Agent);
            //校验
			HashMap<String,Object> map=new HashMap();
			map.put("mchId", mchId_channl);
		    mch_info channl_info=mchinfoWapper.selectby(map).get(0);
            Logger.verifyEquals(1, channl_info.getPayMode(), "验证渠道paymodel=1");
            Logger.verifyEquals(2, channl_info.getMchShareType(), "验证渠道MchShareType=2");
            
            map=new HashMap();
			map.put("mchId", mchId_Agent);
		    mch_info agent_info=mchinfoWapper.selectby(map).get(0);
            Logger.verifyEquals(1, agent_info.getPayMode(), "验证代理paymodel=1");
            Logger.verifyEquals(2, agent_info.getMchShareType(), "验证代理MchShareType=2");
            
		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	
	
	@Test
	@Category({P1.class})
	@TestCase
	public void Tc_setShareType_0098_3() {
		Logger.start(true,"分享类型是切到公共H5时,渠道商关掉了Hipopay，新进来代理也默认是关闭的");
		//该类型渠道商新进来的代理，分享类型为公共H5，支付通道同渠道商配置的支付
		try {
			//创建渠道
            Integer mchId_channl = GodmchManageCallService.CreateSellerMch();
			//设置初始化
			bean=GodmchManageCallService.initsetShareTypeV2(mchId_channl);
			bean.setMchShareType(2);//分享方式1：小程序 2：H5 3：独立小程序  4：独立h5  5：继承版小程序
			bean.setPayMode(0);//支付方式:微信支付通道1：飞界国际2：飞界国际电子商务3：盛付通4:飞界国际贸易 5：自有支付
			bean.setDomesticPayMode(1);//关闭盛付通
			call=GodmchManageCallService.setShareTypeV2Call(bean);
			
			//代理
            Integer mchId_Agent=GodmchManageCallService.createAgent(mchId_channl);
            
			Logger.comment("mchId_channl:"+mchId_channl);
			Logger.comment("mchId_Agent:"+mchId_Agent);
            //校验
			HashMap<String,Object> map=new HashMap();
			map.put("mchId", mchId_channl);
		    mch_info channl_info=mchinfoWapper.selectby(map).get(0);
            Logger.verifyEquals(0, channl_info.getPayMode(), "验证渠道paymodel=0");
            Logger.verifyEquals(1, channl_info.getDomesticPayMode(), "验证渠道DomesticPayMode=1");
            
            map=new HashMap();
			map.put("mchId", mchId_Agent);
		    mch_info agent_info=mchinfoWapper.selectby(map).get(0);
            Logger.verifyEquals(0, agent_info.getPayMode(), "验证代理paymodel=0");
            Logger.verifyEquals(1, agent_info.getDomesticPayMode(), "验证代理DomesticPayMode=1");
            
		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	@Test
	@Category({P1.class})
	@TestCase
	public void Tc_setShareType_098_4() {
		Logger.start(true,"分享类型是切到公共H5时,渠道商关掉了盛付通，新进来代理也默认是关闭的");
		//该类型渠道商新进来的代理，分享类型为公共H5，支付通道同渠道商配置的支付
		try {
			//创建渠道
            Integer mchId_channl = GodmchManageCallService.CreateSellerMch();
			//设置初始化
			bean=GodmchManageCallService.initsetShareTypeV2(mchId_channl);
			bean.setMchShareType(2);//分享方式1：小程序 2：H5 3：独立小程序  4：独立h5  5：继承版小程序
			bean.setPayMode(1);//支付方式:微信支付通道1：飞界国际2：飞界国际电子商务3：盛付通4:飞界国际贸易 5：自有支付
			bean.setDomesticPayMode(0);//关闭盛付通
			call=GodmchManageCallService.setShareTypeV2Call(bean);
			
			//代理
            Integer mchId_Agent=GodmchManageCallService.createAgent(mchId_channl);
            
			Logger.comment("mchId_channl:"+mchId_channl);
			Logger.comment("mchId_Agent:"+mchId_Agent);
            //校验
			HashMap<String,Object> map=new HashMap();
			map.put("mchId", mchId_channl);
		    mch_info channl_info=mchinfoWapper.selectby(map).get(0);
            Logger.verifyEquals(1, channl_info.getPayMode(), "验证渠道paymodel=1");
            Logger.verifyEquals(0, channl_info.getDomesticPayMode(), "验证渠道DomesticPayMode=0");
            
            map=new HashMap();
			map.put("mchId", mchId_Agent);
		    mch_info agent_info=mchinfoWapper.selectby(map).get(0);
            Logger.verifyEquals(1, agent_info.getPayMode(), "验证代理paymodel=1");
            Logger.verifyEquals(0, agent_info.getDomesticPayMode(), "验证代理DomesticPayMode=0");
            
		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	
	
	/**
	 * 分享类型是独立小程序时，支付方式可选Hipopay-飞界国际（跳转收银台）、独立支付，盛付通-海鲲科技（跳转收银台）
	 * 渠道商、代理商均可切换自己的支付通道，可在Hipopay-飞界国际（跳转收银台）、独立支付，盛付通-海鲲科技（跳转收银台）之间切换；
	 * 服务商身份的商家不允许从Hipopay切到盛付通，服务商无法使用盛付通
	 * 该类型渠道商新进来的代理，如果渠道商是独立支付，则代理商是独立H5，支付通道继承上级的独立支付
	 * 如果渠道商支付是hipopay（飞界国际），则代理商分享类型是公共版H5，支付方式是hipopay（飞界国际）
	 * 如果渠道商关掉了Hipopay或盛付通，代理也默认是关闭的
	 */
	@Test
	@Category({P1.class})
	@TestCase
	public void Tc_setShareType_099_1() {
		Logger.start(true,"渠道-分享类型是独立小程序时，支付方式可选Hipopay-飞界国际（跳转收银台）、独立支付，盛付通-海鲲科技（跳转收银台）-成功");
		try {
			//创建渠道
			Integer mchId_channl = GodmchManageCallService.CreateSellerMch();
			
			//设置初始化
			bean=GodmchManageCallService.initsetShareTypeV2(mchId_channl);
			bean.setMchShareType(3);//分享方式1：小程序 2：H5 3：独立小程序  4：独立h5  5：继承版小程序
			
			List<Integer> payModelId=new ArrayList<Integer>();
			payModelId.add(1);
			payModelId.add(5);
			payModelId.add(7);//微信国内支付：1：盛付通
			for (Integer id : payModelId) {
				Logger.comment("### id:  #### "+id);
			   if(id==7)//微信国内支付：1：盛付通
					bean.setDomesticPayMode(1);
				else
					bean.setPayMode(id);//支付方式:微信支付通道1：飞界国际2：飞界国际电子商务3：盛付通4:飞界国际贸易5：自有支付
				
				call=GodmchManageCallService.setShareTypeV2Call(bean);
	            //校验
				check_pay(mchId_channl);
			}

		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	
	
	@Test
	@Category({P1.class})
	@TestCase
	public void Tc_setShareType_099_2() {
		Logger.start(true,"渠道-分享类型是独立小程序时，支付通道切到Hipopay-飞界国际电子商务、飞界国际贸易、支付宝 ：飞界国际-失败");
		try {
			//创建渠道
            Integer mchId_channl = GodmchManageCallService.CreateSellerMch();
			//设置初始化
			bean=GodmchManageCallService.initsetShareTypeV2(mchId_channl);
			bean.setMchShareType(3);//分享方式1：小程序 2：H5 3：独立小程序  4：独立h5  5：继承版小程序
			
			List<Integer> payModelId=new ArrayList<Integer>();
			payModelId.add(2);
			payModelId.add(4);
			payModelId.add(6);//支付宝支付通道0：不支持支付宝 1：飞界国际
			for (Integer id : payModelId) {
				Logger.comment("####  id ####### "+id);
				if(id==6)//，支付宝-飞界国际
					bean.setAliPayMode(1);//支付宝支付通道0：不支持支付宝 1：飞界国际
				else
					bean.setPayMode(id);//支付方式:微信支付通道1：飞界国际2：飞界国际电子商务3：盛付通4:飞界国际贸易5：自有支付
				
				call=GodmchManageCallService.setShareTypeV2Call(bean);
	            //校验
				Logger.verifyEquals("5000", call.getStatus1(), "验证PayMode="+id+"的状态status");
			}

		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	
	
	@Test
	@Category({P1.class})
	@TestCase
	public void Tc_setShareType_099_3() {
		Logger.start(true,"分享类型是独立小程序时,如果渠道商是独立支付，则新进来的代理商是独立H5，支付通道继承上级的独立支付");
		try {
			//创建渠道
            Integer mchId_channl = GodmchManageCallService.CreateSellerMch();
			//设置初始化
			bean=GodmchManageCallService.initsetShareTypeV2(mchId_channl);
			bean.setMchShareType(3);//分享方式1：小程序 2：H5 3：独立小程序  4：独立h5  5：继承版小程序
			bean.setPayMode(5);//支付方式:微信支付通道1：飞界国际2：飞界国际电子商务3：盛付通4:飞界国际贸易 5：自有支付
			call=GodmchManageCallService.setShareTypeV2Call(bean);
			
			//代理
            Integer mchId_Agent=GodmchManageCallService.createAgent(mchId_channl);
            
			Logger.comment("mchId_channl:"+mchId_channl);
			Logger.comment("mchId_Agent:"+mchId_Agent);
            //校验
			HashMap<String,Object> map=new HashMap();
			map.put("mchId", mchId_channl);
		    mch_info channl_info=mchinfoWapper.selectby(map).get(0);
            Logger.verifyEquals(bean.getPayMode(), channl_info.getPayMode(), "验证渠道paymodel="+bean.getPayMode()+"");
            Logger.verifyEquals(3, channl_info.getMchShareType(), "验证渠道MchShareType=3");
            
            map=new HashMap();
			map.put("mchId", mchId_Agent);
		    mch_info agent_info=mchinfoWapper.selectby(map).get(0);
            Logger.verifyEquals(bean.getPayMode(), agent_info.getPayMode(), "验证代理paymodel="+bean.getPayMode()+"");
            Logger.verifyEquals(4, agent_info.getMchShareType(), "验证代理MchShareType=4");
            
		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	
	@Test
	@Category({P1.class})
	@TestCase
	public void Tc_setShareType_099_4() {
		Logger.start(true,"分享类型是独立小程序时,如果渠道商支付是hipopay（飞界国际），则代理商分享类型是公共版H5，支付方式是hipopay（飞界国际）");
		try {
			//创建渠道
            Integer mchId_channl = GodmchManageCallService.CreateSellerMch();
			//设置初始化
			bean=GodmchManageCallService.initsetShareTypeV2(mchId_channl);
			bean.setMchShareType(3);//分享方式1：小程序 2：H5 3：独立小程序  4：独立h5  5：继承版小程序
			bean.setPayMode(1);//支付方式:微信支付通道1：飞界国际2：飞界国际电子商务3：盛付通4:飞界国际贸易 5：自有支付
			call=GodmchManageCallService.setShareTypeV2Call(bean);
			
			//代理
            Integer mchId_Agent=GodmchManageCallService.createAgent(mchId_channl);
            
			Logger.comment("mchId_channl:"+mchId_channl);
			Logger.comment("mchId_Agent:"+mchId_Agent);
            //校验
			HashMap<String,Object> map=new HashMap();
			map.put("mchId", mchId_channl);
		    mch_info channl_info=mchinfoWapper.selectby(map).get(0);
            Logger.verifyEquals(bean.getPayMode(), channl_info.getPayMode(), "验证渠道paymodel="+bean.getPayMode()+"");
            Logger.verifyEquals(3, channl_info.getMchShareType(), "验证渠道MchShareType=3");
            
            map=new HashMap();
			map.put("mchId", mchId_Agent);
		    mch_info agent_info=mchinfoWapper.selectby(map).get(0);
            Logger.verifyEquals(bean.getPayMode(), agent_info.getPayMode(), "验证代理paymodel="+bean.getPayMode()+"");
            Logger.verifyEquals(2, agent_info.getMchShareType(), "验证代理MchShareType=2");
            
		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	
	
	@Test
	@Category({P1.class})
	@TestCase
	public void Tc_setShareType_099_5() {
		Logger.start(true,"分享类型是独立小程序时,渠道商关掉了Hipopay，新进来代理也默认是关闭的");
		//该类型渠道商新进来的代理，分享类型为公共H5，支付通道同渠道商配置的支付
		try {
			//创建渠道
            Integer mchId_channl = GodmchManageCallService.CreateSellerMch();
			//设置初始化
			bean=GodmchManageCallService.initsetShareTypeV2(mchId_channl);
			bean.setMchShareType(2);//分享方式1：小程序 2：H5 3：独立小程序  4：独立h5  5：继承版小程序
			bean.setPayMode(0);//支付方式:微信支付通道1：飞界国际2：飞界国际电子商务3：盛付通4:飞界国际贸易 5：自有支付
			bean.setDomesticPayMode(1);//关闭盛付通
			call=GodmchManageCallService.setShareTypeV2Call(bean);
			
			//代理
            Integer mchId_Agent=GodmchManageCallService.createAgent(mchId_channl);
            
			Logger.comment("mchId_channl:"+mchId_channl);
			Logger.comment("mchId_Agent:"+mchId_Agent);
            //校验
			HashMap<String,Object> map=new HashMap();
			map.put("mchId", mchId_channl);
		    mch_info channl_info=mchinfoWapper.selectby(map).get(0);
            Logger.verifyEquals(0, channl_info.getPayMode(), "验证渠道paymodel=0");
            Logger.verifyEquals(1, channl_info.getDomesticPayMode(), "验证渠道DomesticPayMode=1");
            
            map=new HashMap();
			map.put("mchId", mchId_Agent);
		    mch_info agent_info=mchinfoWapper.selectby(map).get(0);
            Logger.verifyEquals(0, agent_info.getPayMode(), "验证代理paymodel=0");
            Logger.verifyEquals(1, agent_info.getDomesticPayMode(), "验证代理DomesticPayMode=1");
            
		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	@Test
	@Category({P1.class})
	@TestCase
	public void Tc_setShareType_099_6() {
		Logger.start(true,"分享类型是独立小程序时,渠道商关掉了盛付通，新进来代理也默认是关闭的");
		//该类型渠道商新进来的代理，分享类型为公共H5，支付通道同渠道商配置的支付
		try {
			//创建渠道
            Integer mchId_channl = GodmchManageCallService.CreateSellerMch();
			//设置初始化
			bean=GodmchManageCallService.initsetShareTypeV2(mchId_channl);
			bean.setMchShareType(3);//分享方式1：小程序 2：H5 3：独立小程序  4：独立h5  5：继承版小程序
			bean.setPayMode(1);//支付方式:微信支付通道1：飞界国际2：飞界国际电子商务3：盛付通4:飞界国际贸易 5：自有支付
			bean.setDomesticPayMode(0);//关闭盛付通
			call=GodmchManageCallService.setShareTypeV2Call(bean);
			
			//代理
            Integer mchId_Agent=GodmchManageCallService.createAgent(mchId_channl);
            
			Logger.comment("mchId_channl:"+mchId_channl);
			Logger.comment("mchId_Agent:"+mchId_Agent);
            //校验
			HashMap<String,Object> map=new HashMap();
			map.put("mchId", mchId_channl);
		    mch_info channl_info=mchinfoWapper.selectby(map).get(0);
            Logger.verifyEquals(1, channl_info.getPayMode(), "验证渠道paymodel=1");
            Logger.verifyEquals(0, channl_info.getDomesticPayMode(), "验证渠道DomesticPayMode=0");
            
            map=new HashMap();
			map.put("mchId", mchId_Agent);
		    mch_info agent_info=mchinfoWapper.selectby(map).get(0);
            Logger.verifyEquals(1, agent_info.getPayMode(), "验证代理paymodel=1");
            Logger.verifyEquals(0, agent_info.getDomesticPayMode(), "验证代理DomesticPayMode=0");
            
		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	//服务商
	@Test
	@Category({P1.class})
	@TestCase
	public void Tc_setShareType_0114() {
		Logger.start(true,"服务商身份的商家不允许从Hipopay切到盛付通，服务商无法使用盛付通");
		try {
			//创建服务商
			addProviderBean addProviderBean = GodmchManageCallService.InitAddProviderBean();
			addProviderCall addProviderCall=GodmchManageCallService.InitAddProviderCall(addProviderBean);
            Integer mchId_channl=addProviderBean.getProviderId();
            //代理
			Integer mchId_Agent=GodmchManageCallService.createAgent(mchId_channl);
			
			bean=GodmchManageCallService.initsetShareTypeV2(mchId_channl);
			//重新切换通道
			bean.setPayMode(0);
			bean.setDomesticPayMode(1);//支付方式:微信支付通道1：飞界国际2：飞界国际电子商务3：盛付通4:飞界国际贸易
			call=GodmchManageCallService.setShareTypeV2Call(bean);
            //校验
			Logger.verifyEquals("5000", call.getStatus1(), "验证返回成功status值");
	        Logger.verifyEquals(true, call.getMessage().contains("服务商无法使用盛付通"), "验证返回成功Message值");
	        
		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	
	
	@Test
	@Category({P1.class})
	@TestCase
	public void Tc_setShareType_0115() {
		Logger.start(true,"渠道-支付Hipopay payMode=0 并且 domesticPayMode -失败");
		try {
			//创建渠道
            Integer mchId_channl = GodmchManageCallService.CreateSellerMch();
			//设置初始化
			bean=GodmchManageCallService.initsetShareTypeV2(mchId_channl);
			bean.setMchShareType(4);//分享方式1：小程序 2：H5 3：独立小程序  4：独立h5  5：继承版小程序
			
			bean.setPayMode(0);
			bean.setDomesticPayMode(0);
			call=GodmchManageCallService.setShareTypeV2Call(bean);
	        //校验
			Logger.verifyEquals("5000", call.getStatus1(), "验证状态status");

		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	
	
	@Test
	@Category({P1.class})
	@TestCase
	public void Tc_setShareType_0116() {
		Logger.start(true,"国内渠道-可设置多级代理 -成功");
		try {
			//创建渠道
            Integer mchId_channl = GodmchManageCallService.channl_CHN().getMchId();
			//设置初始化
			bean=GodmchManageCallService.initsetShareTypeV2(mchId_channl);
			bean.setVipChannel(true);//是否开启多级代理
			call=GodmchManageCallService.setShareTypeV2Call(bean);
	        //校验
			HashMap<String,Object> map=new HashMap();
			map.put("mchId", mchId_channl);
		    mch_info channl_info=mchinfoWapper.selectby(map).get(0);
            Logger.verifyEquals(1, channl_info.getVip(), "验证渠道vip=1");
            
		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	
	
	@Test
	@Category({P1.class})
	@TestCase
	public void Tc_setShareType_0117() {
		Logger.start(true,"国内渠道-更新结算币种参数 -成功");
		try {
			//创建渠道
            Integer mchId_channl = GodmchManageCallService.channl_CHN().getMchId();
           // Integer mchId_channl =500772703;
			//设置初始化
			bean=GodmchManageCallService.initsetShareTypeV2(mchId_channl);
			bean.setSettlementCurrency("EUR");//切换币种  AUD 不支持本土       EUR支持本地
			call=GodmchManageCallService.setShareTypeV2Call(bean); 
//	        //校验
//			HashMap<String,Object> map=new HashMap();
//			map.put("mchId", mchId_channl);
//		    mch_info channl_info=mchinfoWapper.selectby(map).get(0);
//            Logger.verifyEquals(1, channl_info.getVip(), "验证渠道vip=1");
            
		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	
	
	@Test
	@Category({P1.class})
	@TestCase
	@Ignore
	public void Tc_setShareType_118() {
		//Logger.start(true, "独立商户无下级 由3:独立小程序切换成 4:独立H5");
		//独立商户 支付只能是5 20200509
		Logger.start(true, "独立商户无下级 由3:独立小程序切换成 4:独立H5(20200407修改分享类型是切到独立H5时，支付通道自动切到Hipopay-独立支付)");
		try {
	
			//1：创建独立商户
			createIndepMchCall createIndepMchCall=new createIndepMchCall();
			createIndepMchBean createIndepMchBean=GodmchManageCallService.InitCreateIndepMchBean();
			createIndepMchBean.setMchShareType(3);//1小程序2h5 3：独立小程序 4：独立h5
			createIndepMchCall.setData(createIndepMchBean);
			createIndepMchCall.callService();
			
			//切换
			bean= initSetShareType();
			bean.setMchId(createIndepMchCall.getmchId());
			bean.setMchId(createIndepMchCall.getmchId());
			bean.setDualMode(0);//双店模式0：正常模式（默认）1：双店模式
			bean.setPayMode(1);//支付方式:微信支付通道0：不支持 1：飞界国际2：飞界国际电子商务3：盛付通4：飞界国际贸易5：自有支付
			bean.setDomesticPayMode(1);//微信国内支付通道:0：不支持  1：盛付通
			bean.setMchShareType(4);//分享方式1：小程序 2：H5 3：独立小程序  4：独立h5  5：继承版小程序
			call.setData(bean);
			call.callService();
			
			
			//20200407修改分享类型是切到独立H5时，支付通道自动切到Hipopay-独立支付
			Logger.verifyEquals("5000", call.getStatus1(), "独立H5不能使用飞界国际");

 
		} catch (Exception e) {
			Logger.fail(e);
		}
	}
		
	
	@Test
	@Category({P1.class})
	@TestCase
	public void Tc_setShareType_119() {
		Logger.start(true, "是支持海外地址、不开启图片补白功能-成功");
		try {
	
			bean= initSetShareType();
			bean.setOverseasAddressEnabled(true);//是否支持海外地址
			bean.setProductPicAutoFill(false);//是否开启图片补白功能
			call.setData(bean);
			call.callService();
			
			check_verify(true);
 
		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	
	@Test
	@Category({P1.class})
	@TestCase
	public void Tc_setShareType_120() {
		Logger.start(true, "不是支持海外地址、开启图片补白功能-成功");
		try {
	
			bean= initSetShareType();
			bean.setOverseasAddressEnabled(false);//是否支持海外地址
			bean.setProductPicAutoFill(true);//是否开启图片补白功能
			call.setData(bean);
			call.callService();
			
			check_verify(true);
 
		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	
	
	@Test
	@Category({P1.class})
	@TestCase
	public void Tc_setShareType_121() {
		Logger.start(true, "多币种标价配置-设置一个币种-成功");
		try {
	
			bean= initSetShareType();
			bean.setmultiCurrencyList(Lists.newArrayList("HKD"));
			call.setData(bean);
			call.callService();
			
			check_verify(true);
 
		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	
	
	@Test
	@Category({P1.class})
	@TestCase
	public void Tc_setShareType_122() {
		Logger.start(true, "多币种标价配置-设置两个币种-成功");
		try {
	
			bean= initSetShareType();
			bean.setmultiCurrencyList(Lists.newArrayList("HKD","GBP"));
			call.setData(bean);
			call.callService();
			
			check_verify(true);
 
		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	
	@Test
	@Category({P1.class})
	@TestCase
	public void Tc_setShareType_123() {
		Logger.start(true, "多币种标价配置-设置不存在的币种-成功");
		try {
	
			bean= initSetShareType();
			bean.setmultiCurrencyList(Lists.newArrayList("FRA","GBP"));
			bean.setOverseasAddressEnabled(false);//是否支持海外地址
			bean.setProductPicAutoFill(true);//是否开启图片补白功能
			call.setData(bean);
			call.callService();
			
			Logger.verifyEquals("5000", call.getStatus1(), "验证返回成功status值");
	        Logger.verifyEquals(true, call.getMessage().contains("多币种标价选择的币种不支持"), "验证返回成功Message值");
 
		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	
	
	@Test
	@Category({P1.class})
	@TestCase
	public void Tc_setShareType_124() {
		Logger.start(true, "多币种标价配置-设置与结束币种重复-成功");
		try {
	
			bean= initSetShareType();
			bean.setmultiCurrencyList(Lists.newArrayList("USD","GBP"));
			bean.setOverseasAddressEnabled(false);//是否支持海外地址
			bean.setProductPicAutoFill(true);//是否开启图片补白功能
			call.setData(bean);
			call.callService();

			check_verify(true);
 
		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	
	
	
	@Test
	@Category({P1.class})
	@TestCase
	public void Tc_setShareType_125() {
		Logger.start(true, "独立商户由1:公版小程序 切换成 2:公版H5-下级代理也切换成2:公版H5");
		try {
	
			//1：创建独立商户
			createIndepMchCall createIndepMchCall=new createIndepMchCall();
			createIndepMchBean createIndepMchBean=GodmchManageCallService.InitCreateIndepMchBean();
			createIndepMchBean.setTitle("测试有下级ww2");
			createIndepMchBean.setMchShareType(1);
			createIndepMchCall.setData(createIndepMchBean);
			createIndepMchCall.callService();
			
			//2：申请代理
			applyAgentBean applyBean=GodmchManageCallService.InitApplyAgentBean();
			applyBean.setMchId(createIndepMchCall.getmchId());
			applyBean.setAppKey("appsqSeller_"+createIndepMchCall.getmchId());
			applyAgentCall applyCall=GodmchManageCallService.ApplyAgentCall(applyBean);
			//代理类型
			createagentBean agentBean=GodmchManageCallService.InitCreateAgentTypeBean(applyBean.getMchId());
			createagentCall agentCall=GodmchManageCallService.CreateAgentTypeCall(agentBean);
			//查询代理类型
			Map<String,Object> map=new HashMap();
			map.put("mchId", applyBean.getMchId());
			List<agent_type> list=GodmchManageCallService.agentTypeWapper.selectby(map);
			//3:审核代理
			approveAgentBean approveAgentBean=new approveAgentBean();
			approveAgentBean.setMchId(applyBean.getMchId());
			approveAgentBean.setAgentId(applyCall.getAgentId());
			approveAgentBean.setAgentType(list.get(0).getAgentType());
			approveAgentBean.setAgentMode(1);
		
			GodmchManageCallService.ApproveAgentCall(approveAgentBean);
			//切换
			bean= initSetShareType();
			bean.setMchId(createIndepMchCall.getmchId());
			bean.setDualMode(0);//双店模式0：正常模式（默认）1：双店模式
			bean.setPayMode(1);//支付方式:微信支付通道1：飞界国际2：飞界国际电子商务3：盛付通
			bean.setMchShareType(2);//分享方式1：小程序 2：H5 3：独立小程序  4：独立h5  5：继承版小程序
			call.setData(bean);
			call.callService();
			Thread.sleep(5000);//MQ更新下级信息，所以需要休眠
			Logger.comment("MchId():"+approveAgentBean.getMchId());
			Logger.comment("AgentId():"+approveAgentBean.getAgentId());
			//验证
			List<Integer> channl_mchIds=new ArrayList<Integer>();
			channl_mchIds.add(approveAgentBean.getMchId());
			mch_info  channl_info=mchinfoWapper.selectbyMchIds(channl_mchIds).get(0);
			
			List<Integer> agent_mchIds=new ArrayList<Integer>();
			agent_mchIds.add(approveAgentBean.getAgentId());
			mch_info  agent_info=mchinfoWapper.selectbyMchIds(agent_mchIds).get(0);
			
			Logger.verifyEquals(2,channl_info.getMchShareType(), "验证独立商户是公版H5");
			Logger.verifyEquals(2,agent_info.getMchShareType(), "验证独立商户是公版H5");
			
 
		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	
	
	
	@Test
	@Category({P1.class})
	@TestCase
	public void Tc_setShareType_126() {
		Logger.start(true, "独立商户由1:公版小程序 切换成 2:公版H5-下级代理也切换成 2:公版H5");
		try {
	
	        //创建独立商户1
            createIndepMchBean createIndepMchBean=GodmchManageCallService.InitCreateIndepMchBean();
            createIndepMchBean.setMchShareType(1);
			createIndepMchCall createIndepMchCall=GodmchManageCallService.CreateIndepMchCall(createIndepMchBean);
			//申请供货商
			 applySupplierBean applySupplierBean=GodmchManageCallService.initApplySupplier(createIndepMchCall.getmchId());
			 applySupplierCall applySupplierCall=GodmchManageCallService.applySupplierCall(applySupplierBean);
			//同意
			GodmchManageCallService.approveSupplier(createIndepMchCall.getmchId(), applySupplierCall.getSupplierId());

			//切换
			bean= initSetShareType();
			bean.setMchId(createIndepMchCall.getmchId());
			bean.setDualMode(0);//双店模式0：正常模式（默认）1：双店模式
			//bean.setPayMode(1);//支付方式:微信支付通道1：飞界国际2：飞界国际电子商务3：盛付通
			bean.setMchShareType(2);//分享方式1：小程序 2：H5 3：独立小程序  4：独立h5  5：继承版小程序
			call.setData(bean);
			call.callService();
			
			Thread.sleep(5000);
			//验证
			List<Integer> channl_mchIds=new ArrayList<Integer>();
			channl_mchIds.add(applySupplierBean.getMchId());
			mch_info  channl_info=mchinfoWapper.selectbyMchIds(channl_mchIds).get(0);
			
			List<Integer> agent_mchIds=new ArrayList<Integer>();
			agent_mchIds.add(applySupplierCall.getSupplierId());
			mch_info  agent_info=mchinfoWapper.selectbyMchIds(agent_mchIds).get(0);
			
			Logger.verifyEquals(2,channl_info.getMchShareType(), "验证独立商户channl是公版H5");
			Logger.verifyEquals(2,agent_info.getMchShareType(), "验证独立商户agent是公版H5");
			
 
		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	
	
	
	@Test
	@Category({P1.class})
	@TestCase
	public void Tc_setShareType_127() {
		Logger.start(true, "独立商户-运营申请代理-1:公版小程序 切换成 2:公版H5-下级代理也切换成 2:公版H5");
		try {
	
	        //创建独立商户1
            createIndepMchBean createIndepMchBean=GodmchManageCallService.InitCreateIndepMchBean();
            createIndepMchBean.setMchShareType(1);
			createIndepMchCall createIndepMchCall1=GodmchManageCallService.CreateIndepMchCall(createIndepMchBean);
			createIndepMchBean=GodmchManageCallService.InitCreateIndepMchBean();
            createIndepMchBean.setMchShareType(1);
			createIndepMchCall createIndepMchCall2=GodmchManageCallService.CreateIndepMchCall(createIndepMchBean);
			//运营绑定代理
			adminBindAgentBean adminBindAgentBean=GodmchManageCallService.initAdminBindAgent(createIndepMchCall1.getmchId(), createIndepMchCall2.getmchId());
			adminBindAgentCall adminBindAgentCall=GodmchManageCallService.AdminBindAgent(adminBindAgentBean);
		     //审核通过
			approveAgentBean approveAgentBean=GodmchManageCallService.approveAgentBeanV2(adminBindAgentBean.getMchId(),adminBindAgentBean.getAgentId());
			GodmchManageCallService.ApproveAgentCall(approveAgentBean);

			//切换
			bean= initSetShareType();
			bean.setMchId(adminBindAgentBean.getMchId());
			bean.setDualMode(0);//双店模式0：正常模式（默认）1：双店模式
			//bean.setPayMode(1);//支付方式:微信支付通道1：飞界国际2：飞界国际电子商务3：盛付通
			bean.setMchShareType(2);//分享方式1：小程序 2：H5 3：独立小程序  4：独立h5  5：继承版小程序
			call.setData(bean);
			call.callService();
			
			Thread.sleep(5000);
			//验证
			List<Integer> channl_mchIds=new ArrayList<Integer>();
			channl_mchIds.add(createIndepMchCall1.getmchId());
			mch_info  channl_info=mchinfoWapper.selectbyMchIds(channl_mchIds).get(0);
			
			List<Integer> agent_mchIds=new ArrayList<Integer>();
			agent_mchIds.add(createIndepMchCall2.getmchId());
			mch_info  agent_info=mchinfoWapper.selectbyMchIds(agent_mchIds).get(0);
			
			Logger.verifyEquals(2,channl_info.getMchShareType(), "验证独立商户channl是公版H5");
			Logger.verifyEquals(1,agent_info.getMchShareType(), "验证独立商户agent是公版H5");
			
 
		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	
	
	
	
	@Test
	@Category({P1.class})
	@TestCase
	public void Tc_setShareType_128() {
		Logger.start(true, "独立商户-支付宝国内支付通道  1：盛付通");
		try {
	
	        //创建独立商户1
            createIndepMchBean createIndepMchBean=GodmchManageCallService.InitCreateIndepMchBean();
           // createIndepMchBean.setMchShareType(1);
			createIndepMchCall createIndepMchCall=GodmchManageCallService.CreateIndepMchCall(createIndepMchBean);
			Integer mchId=createIndepMchCall.getmchId();
			//申请审核代理
			applyAgentCall applyAgentCall=GodmchManageCallService.applyAndapproveAgent(mchId);

			//切换
			bean= initSetShareType();
			bean.setMchId(mchId);
			bean.setDualMode(0);//双店模式0：正常模式（默认）1：双店模式
			//bean.setPayMode(1);//支付方式:微信支付通道1：飞界国际2：飞界国际电子商务3：盛付通
			bean.setMchShareType(2);//分享方式1：小程序 2：H5 3：独立小程序  4：独立h5  5：继承版小程序
			bean.setAliPayDomesticPayMode(1);//支付宝国内支付通道 0：不开启 1：盛付通
			call.setData(bean);
			call.callService();
			
			Thread.sleep(5000);
			//验证
			List<Integer> channl_mchIds=new ArrayList<Integer>();
			channl_mchIds.add(mchId);
			mch_info  channl_info=mchinfoWapper.selectbyMchIds(channl_mchIds).get(0);
			
			List<Integer> agent_mchIds=new ArrayList<Integer>();
			agent_mchIds.add(applyAgentCall.getAgentId());
			mch_info  agent_info=mchinfoWapper.selectbyMchIds(agent_mchIds).get(0);

			Logger.verifyEquals(1,channl_info.getAliPayDomesticPayMode(), "验证独立商户AliPayDomesticPayMode");

			Logger.verifyEquals(0,agent_info.getAliPayDomesticPayMode(), "验证独立商户agent是AliPayDomesticPayMode");
			
 
		} catch (Exception e) {
			Logger.fail(e);
		}
	}
}